Are function arguments with the value `undefined` "present"?
tschneidereit at gmail.com
Fri May 31 07:50:59 PDT 2013
ah, thanks. That is indeed what I was looking for. Sadly, it isn't entirely
clear to me that any sort of real conclusion has been reached.
On Fri, May 31, 2013 at 4:23 PM, David Bruant <bruant.d at gmail.com> wrote:
> Hi Till,
> I believe Boris Zbarski touched on this recently at
> http://lists.w3.org/Archives/Public/public-script-coord/2013AprJun/0428.html(I haven't read the full thread, so can't tell what the conclusion were,
> but it's probably worth checking out)
> Le 31/05/2013 04:33, Till Schneidereit a écrit :
> I couldn't find any precise definition for the spec term "present", so
> this is not entirely clear to me.
> In step 7 of 220.127.116.11 Array.prototype.reduce, a TypeError must be thrown
> if the optional argument `initialValue` isn't present. If a value of
> `undefined` does *not* cause the argument to be present, that function can
> be implemented with the following signature:
> `function ArrayReduce(callbackfn, initialValue = undefined)`
> If, however, the value `undefined` means that the argument is present,
> the signature should probably be:
> `function ArrayReduce(callbackfn, ...rest)`
> The question isn't entirely academic, as I'm trying to get the
> self-hosted implementations of builtins in SpiderMonkey to be as close to
> the spec as possible.
> es-discuss mailing listes-discuss at mozilla.orghttps://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss