What strict mode eval declarations did we really ban?

David-Sarah Hopwood david.hopwood at industrial-designers.co.uk
Wed Feb 11 08:04:58 PST 2009

Mark S. Miller wrote:
> 2009/2/10 Allen Wirfs-Brock <Allen.Wirfs-Brock at microsoft.com>
>> 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.


Allen Wirfs-Brock wrote:
> 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.

Doesn't matter to me whether it is EvalError or SyntaxError. However, are
there other identifiers that should be banned by the same rule? For example,
'arguments' behaves like a keyword in some respects.

David-Sarah Hopwood ⚥

More information about the Es-discuss mailing list