Re: [WebIDL] Handling undefined in Overload Resolution Algorithm

On Mon, 22 Aug 2011 06:41:12 +0200, Cameron McCormack <cam@mcc.id.au>  
wrote:
> On 9/08/11 10:14 AM, Cameron McCormack wrote:
>> I'll investigate existing APIs to see how many we would need to annotate
>> with "explicit undefined doesn't mean missing argument" behaviour.
>
> 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.

FWIW, today I changed XMLHttpRequest's open() from being overloaded to  
simply having optional arguments. I hope they are considered identical.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 23 August 2011 10:28:40 UTC