Strict mode recap

Lars Hansen lhansen at adobe.com
Thu Apr 10 22:09:46 PDT 2008


> -----Original Message-----
> From: zeppieri at gmail.com [mailto:zeppieri at gmail.com] On 
> Behalf Of Jon Zeppieri
> Sent: 10. april 2008 21:31
> To: Lars Hansen
> Cc: liorean; es4-discuss at mozilla.org
> Subject: Re: Strict mode recap
> 
> On 4/10/08, Jon Zeppieri <jaz at bu.edu> wrote:
> >
> >     var o = { null var count = 100, ... };
> 
> Sorry:  two syntactic mistakes, here, one of which is interesting.
> The boring one is my use of '=' rather than ':'.
> 
> But after reading the object initializer draft, I see that, 
> if the intent of the above were legal, the syntax would be:
> 
> var o = { var null::count: 100 };

I don't think null is a valid namespace (but I'm still waiting
for Jeff's spec on names to verify that) and it would in any
case be redundant; when we talked about it being legal, the
meaning was "the compatibility namespace", which is what you
get by just leaving it off.

Apart from that there's no problem.  "var" is used to indicate
a mutable fixture property, but it is just a flag (as is "const").
The primary form is just { ns::id: val }, which is a 
straightforward evolution of the ES3 form { ns: val }.

--lars



More information about the Es4-discuss mailing list