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

Re: Reconciling handling of optional arguments and handling of default values across ES and webidl

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 08 May 2013 20:48:21 -0400
Message-ID: <518AF255.2030309@mit.edu>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 5/8/13 7:17 PM, Allen Wirfs-Brock wrote:
> This is not how argument.length is currently specified in either ES5 or ES6.

Yes, I'm well aware.

> That's how JS code distinguishes between missing trailing arguments and explicitly passed undefined.

Why does it need to distinguish?

If there are cases when one needs to distinguish, could we please figure 
out exactly what those are?  I was given to understand that we always 
wanted to treat undefined the same as "missing argument", in the context 
of WebIDL, but if that's not the case then please do enlighten me as to 
the exceptions...

> some built-ins that are specified to distinguish the missing from undefined arguments cases.

What are these built-ins and why do they care about the distinction? 
Understanding that seems important for designing future APIs and for 
what we do with WebIDL...

-Boris
Received on Thursday, 9 May 2013 00:48:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC