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

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

From: <bugzilla@jessica.w3.org>
Date: Wed, 28 Aug 2013 05:08:12 +0000
To: public-script-coord@w3.org
Message-ID: <bug-23056-3890-L3n0Cm7on2@http.www.w3.org/Bugs/Public/>

--- 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.


> 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

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