assignment to eval in strict code

Mark Miller erights at gmail.com
Wed Feb 18 08:48:30 PST 2009


On Wed, Feb 18, 2009 at 8:40 AM, Allen Wirfs-Brock <
Allen.Wirfs-Brock at microsoft.com> wrote:

> >-----Original Message-----
> >From: Mark S. Miller [mailto:erights at google.com]
> >Sent: Thursday, February 12, 2009 4:58 PM
> >
> >Good. So does anyone object to ES3.1-strict imposing the same
> >restrictions on the magic name "arguments" as we will on "eval"?
> >
>
> In strict mode, "arguments" is already defined using an ImmutableBinding so
> assigning to it will fail in a manner similar to assignment to eval.  We
> probably should list both of these assignment situations in section 16 as
> errors that can be reported at parse time.
>
> As currently specified strict code can declare a formal parameter, var, or
> function named "arguments" but doing so blocks creation of an arguments
> object and its binding.
>

Yes. I am suggesting the such declarations not be allowed in strict code.


-- 
Text by me above is hereby placed in the public domain

   Cheers,
   --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090218/da1850b7/attachment.html>


More information about the Es-discuss mailing list