[Bug 23056] Function's length property is inconsistent with EcmaScript

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23056

--- Comment #7 from Boris Zbarsky <bzbarsky@mit.edu> ---
> A better mapping is:

No, that's semantically different.  In your mapping, if I call foo(1, 2) that's
the same as calling foo(1, 2, 0), but in the WebIDL behavior arg3 does not have
0 as a value, or indeed any value at all.  It's simply "not passed".  As is
arg5.  But arg4 has the value 5.

> The appropriate translation of WebIDL to ES6 is that WebIDL "optional" always
> turns into an ES6 parameter with a default value initialiser.

Why?

> the implicit WebIDL default should be used as the ES6 default value.

There is no implicit default value.

Might be worth having this conversation in only one spot, by the way; I suggest
the list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Wednesday, 28 August 2013 05:08:13 UTC