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 18:55:55 -0400
Message-ID: <518AD7FB.60305@mit.edu>
To: Domenic Denicola <domenic@domenicdenicola.com>
CC: Jonas Sicking <jonas@sicking.cc>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 5/8/13 6:30 PM, Domenic Denicola wrote:
> Good catch Jonas. Boris, is there a chance you meant `function.length`?

No, I meant what I said.  I'll respond to Jonas' mail about rest 
parameters in a bit; I need to think through how those would behave in a 
real undefined == not passed world vs how they behave right now in WebIDL.

> That *is* specified in ES to not include optional arguments, whereas the `arguments.length` change below would be backward-incompatible

Yes, I know.  I did say my proposal does not match the status quo.

The proposed changes to undefined handling in WebIDL are likewise 
backwards-incompatible, which does not make them necessarily undesirable...

> and probably break the web...

This is an interesting question.  It would break the web to the extent 
that people are treating "not passed" and "undefined" differently while 
introspecting arguments.length, yes?  Are people doing that in cases not 
involving things like rest parameters, or is the problem limited to rest 
parameters?

-Boris
Received on Wednesday, 8 May 2013 22:56:25 UTC

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