Re: What does "is not present" mean in spec algorithms?

2014-02-21 Thread Brendan Eich
No informative deed goes unpunished, especially (as in this case) if it has contradictory normative implications! This was the lesson of ECMA-357 (E4X), with its overdone informative prose which often contradicted the normative prose. /be Sent from my iPad > On Feb 21, 2014, at 3:29 PM, Allen

Re: What does "is not present" mean in spec algorithms?

2014-02-21 Thread Allen Wirfs-Brock
On Feb 21, 2014, at 3:16 PM, Brandon Benvie wrote: > On 2/21/2014 3:08 PM, Allen Wirfs-Brock wrote: >>> ``` >> Don't put too much weight into that. I've experiment with use the latter >> style when define some new methods to see where it is helpfully more >> descriptive. I just haven't bother t

Re: What does "is not present" mean in spec algorithms?

2014-02-21 Thread Brandon Benvie
On 2/21/2014 3:08 PM, Allen Wirfs-Brock wrote: It might be worth coming up with good terms for "ES5-style optional arguments" and "ES6-style optional arguments" which can be used consistently in the spec. They can already be distinguished by signature, ie: ```js Array.prototype.reduce ( callba

Re: What does "is not present" mean in spec algorithms?

2014-02-21 Thread Allen Wirfs-Brock
On Feb 21, 2014, at 1:47 PM, C. Scott Ananian wrote: > I wasn't confused by the spec text as is, but I'm not surprised that > others are. The language is battling against two different "standards" > for optional arguments. In ES5 typically "not present" is used; in ES6 > for consistency with the

Re: What does "is not present" mean in spec algorithms?

2014-02-21 Thread C. Scott Ananian
I wasn't confused by the spec text as is, but I'm not surprised that others are. The language is battling against two different "standards" for optional arguments. In ES5 typically "not present" is used; in ES6 for consistency with the new language optional arguments, "undefined" is treated as "not

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Boris Zbarsky
On 2/20/14 12:24 PM, Allen Wirfs-Brock wrote: Would you prefer it to say "If fewer than two arguments were passed, then let deleteCount be ..."? That would be clearer, yes, if we want to stick to natural language here. It avoids confusion about undefined == missing issues, for sure, and mak

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Allen Wirfs-Brock
On Feb 20, 2014, at 9:11 AM, Boris Zbarsky wrote: > On 2/20/14 11:16 AM, Allen Wirfs-Brock wrote: >> Nope, it means that the length of the argument list is less than two, >> hence an argument corresponding to 'deleteCount' was not passed. Would you prefer it to say "If fewer than two arguments w

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Rick Waldron
On Thu, Feb 20, 2014 at 12:11 PM, Boris Zbarsky wrote: > On 2/20/14 11:16 AM, Allen Wirfs-Brock wrote: > >> Nope, it means that the length of the argument list is less than two, >> hence an argument corresponding to 'deleteCount' was not passed. >> > > OK. In that case, I think this term _really

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Boris Zbarsky
On 2/20/14 12:09 PM, Allen Wirfs-Brock wrote: Boris should file a bug. Done. https://bugs.ecmascript.org/show_bug.cgi?id=2559 Thanks, Boris ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Boris Zbarsky
On 2/20/14 11:16 AM, Allen Wirfs-Brock wrote: Nope, it means that the length of the argument list is less than two, hence an argument corresponding to 'deleteCount' was not passed. OK. In that case, I think this term _really_ needs to be defined. Ideally with links to the definition whenever

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Allen Wirfs-Brock
On Feb 20, 2014, at 8:36 AM, Brendan Eich wrote: > On Feb 20, 2014, at 8:16 AM, Allen Wirfs-Brock wrote: > >> Nope, it means that the length of the argument list is less than two, hence >> an argument corresponding to 'deleteCount' was not passed. >> >> http://people.mozilla.org/~jorendorff/e

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Brendan Eich
On Feb 20, 2014, at 8:16 AM, Allen Wirfs-Brock wrote: > > Nope, it means that the length of the argument list is less than two, hence > an argument corresponding to 'deleteCount' was not passed. > > http://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-standard-built-in-objects >

Re: What does "is not present" mean in spec algorithms?

2014-02-20 Thread Allen Wirfs-Brock
On Feb 20, 2014, at 7:49 AM, Boris Zbarsky wrote: > Consider > http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.splice > step 10. It uses the phrasing "if deleteCount is not present" but I can't > find anything in the specification defining the concept of "present" or

What does "is not present" mean in spec algorithms?

2014-02-20 Thread Boris Zbarsky
Consider http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.splice step 10. It uses the phrasing "if deleteCount is not present" but I can't find anything in the specification defining the concept of "present" or "not present". So it's hard for me to tell what behavior