Re: [Future] First arguments should not be optional

On 5/8/13 2:02 PM, Domenic Denicola wrote:
> This is a good illustration of the kind of conflict between DOM API designers and normal ECMAScript semantics. Normal ECMAScript semantics would demand that `undefined` and no parameter be treated the same

Except for arguments.length.

> Furthermore, `null` should not be treated the same as `undefined`; it should throw a `TypeError`

That's supported in WebIDL right now; it's not obvious to me why the 
futures spec chose to not do that if it really wants to make this 
argument optional but not nullable.  Unless of course they really do 
want to allow passing in null.

> Finally, I think the correct behavior is to ignore non-Callables, instead of throwing.

That's supported in WebIDL too, actually.  Again, unclear why the spec 
is not doing that if that's what it wants to do.

> I don't think the spec follows this

It does not, indeed.

-Boris

Received on Wednesday, 8 May 2013 18:09:09 UTC