Is EvalError still needed?

Allen Wirfs-Brock Allen.Wirfs-Brock at
Mon Feb 9 16:55:20 PST 2009

The Mountain View notes don't directly address this and I don't recall us discussing it specifically at the meeting but it seems that the formalization of direct and indirect evals and their scoping means that the ES3 permission for an implementation to essentially forbid indirect evals or the changing of the global  value of eval is no longer necessary or desirable:

"If the value of the eval property is used in any way other than a direct call (that is, other than by the explicit use of its name as an Identifier which is the MemberExpression in a CallExpression), or if the eval property is assigned to, an EvalError exception may be thrown."

Any disagreement?  Can we delete the above paragraph?  (I've already taken care that direct eval is adequately defined elsewhere).

If we do delete this paragraph , then there are no longer any places in the specification that specify the throwing of an EvalError (I've already gotten rid of the only other occurrences which were in 10.6 (Declaration Binding Instantiation) and related to strict mode evals).  If we don't specify any use of EvalError what should we do with it? Remove it from the ES3.1 spec? (probably not)  Keep it for legacy compatibility? (probably) Say it is reserved for implementation usage?  Any other ideas?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Es-discuss mailing list