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

Re: [WebIDL] Handling undefined in Overload Resolution Algorithm

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 09 Sep 2011 13:11:16 +1000
Message-ID: <4E6983D4.6050103@mcc.id.au>
To: Jonas Sicking <jonas@sicking.cc>
CC: Lachlan Hunt <lachlan.hunt@lachy.id.au>, public-script-coord@w3.org, bzbarsky@mit.edu, allen@wirfs-brock.com
On 22/08/11 2:41 PM, Cameron McCormack wrote:
> I started doing this today. I got through half of the list of HTML5 APIs
> where you have overloading or optional arguments, and I did not find any
> instance of an implementation treating undefined as an omitted optional
> argument. However, many of them either have non-interoperable behaviour
> across implementations, or have behaviour such that omitting the
> argument has the same result as coercing undefined to the argument type
> and treating it as a specified argument. So I think going ahead with
> this change, and annotating those that really require undefined not to
> be treated as an omitted optional argument, is feasible.

I have now made the change that makes trailing undefined values in 
function calls be treated as missing optional arguments.  I haven't 
added an extended attribute yet to force undefined to be treated as an 
explicit argument in cases where it would otherwise be treated as a 
missing optional argument.  We can add this if we find the need.


Lachy, can you indicate whether this change is satisfactory.


Received on Friday, 9 September 2011 03:12:06 UTC

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