W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2011

Re: no longer treating explicit undefined as a missing, optional argument

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 29 Dec 2011 15:14:26 +1100
Message-ID: <4EFBE922.70109@mcc.id.au>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
CC: Jonas Sicking <jonas@sicking.cc>, Boris Zbarsky <bzbarsky@mit.edu>, Lachlan Hunt <lachlan.hunt@lachy.id.au>, Allen Wirfs-Brock <allen@wirfs-brock.com>, Anne van Kesteren <annevk@opera.com>, Brendan Eich <brendan@mozilla.org>
Cameron McCormack:
> If we stop treating undefined as an omitted argument, then the only
> way you could write this in IDL would be:
> void open(DOMString method, DOMString url, optional boolean async,
> optional any user, optional any password);
> and to then handle in prose the user/password arguments so that
> undefined means "don't override the user/password from the url",
> which is what null means. Otherwise, we could introduce a new
> [TreatUndefinedAs=MissingArgument] extended attribute.

I've done this now; explicit undefined is not treated as a missing 
optional argument unless [TreatUndefinedAs=Missing] is specified on the 
optional argument, which shouldn't be used in specs unless required for 
Received on Thursday, 29 December 2011 04:15:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:05 UTC