W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2011

Re: [WebIDL] Dictionaries and undefined

From: Erik Arvidsson <arv@chromium.org>
Date: Tue, 11 Oct 2011 10:25:10 -0700
Message-ID: <CAJ8+GoikEne_g4DnHa4ihdROfXy+xqq6mC2aDTB=Co1aj0KDnw@mail.gmail.com>
To: "Mark S. Miller" <erights@google.com>
Cc: Dominic Cooney <dominicc@google.com>, Jonas Sicking <jonas@sicking.cc>, public-script-coord@w3.org
Also, worth considering is optional arguments in the current ES6
draft. In ES6 the value undefined is not treated as absent.

function f(x = 42) {
  return x;
}

print(f());  // "42"
print(f(undefined));  // "undefined"

So, to me it seems like the WebIDL to ES mappings needs to treat
undefined as present.

erik








On Tue, Oct 11, 2011 at 04:57, Mark S. Miller <erights@google.com> wrote:
> On Tue, Oct 11, 2011 at 8:44 AM, Dominic Cooney <dominicc@google.com> wrote:
>>
>> Since arguments.length isn't friendly to strict mode, this seems to be a
>> good assumption for the future at the very least.
>
> What's the issue with "arguments.length" in strict mode? Are you perhaps
> thinking of arguments.callee and/or arguments.caller?
>
> --
>     Cheers,
>     --MarkM
>
Received on Tuesday, 11 October 2011 17:26:02 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC