What strict mode eval declarations did we really ban?

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Tue Feb 10 19:50:20 PST 2009

However, now that I think a little bit more about, it would be reasonable to say that any strict mode declaration of "eval" is an EvalError.  I was going to say it was a SyntaxError but EvalError is more specific and in line with its ES3 heriatage.

From: Mark S. Miller [mailto:erights at google.com]
Sent: Tuesday, February 10, 2009 7:25 PM
To: Allen Wirfs-Brock
Cc: es-discuss
Subject: Re: What strict mode eval declarations did we really ban?

2009/2/10 Allen Wirfs-Brock <Allen.Wirfs-Brock at microsoft.com<mailto:Allen.Wirfs-Brock at microsoft.com>>

Waldemar's Mountain View notes said: - Agreed to disallow the use of "eval" as the name of a local variable, function parameter, etc. in strict mode.

Did we really mean that only function scoped declarations are so restricted?  What about var declarations in strict global code?

What about function declarations? Can they have "eval" as their function name if they are contained in  strict function code or in strict code in general.

The simplest story is that "eval" is banned from all declarations in strict mode code.

This is one of those happy cases where simplest is best. The net effect is that ES3.1-strict can be explained as if "eval" is a keyword.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090210/b0165254/attachment.html>

More information about the Es-discuss mailing list