indirect eval spec too severe?

Igor Bukanov igor at mir2.org
Fri Jan 23 10:13:44 PST 2009


2009/1/18 Mark S. Miller <erights at google.com>:
> The Mountain View draft says:
>> 15.1.2.1.1    Strict Mode Restrictions
>> If strict mode code uses the value of the eval property any way other than
>> as 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 is thrown.
>
> I believe this spec is too severe

The intention of the spec is very close to saying that in the strict
mode eval is a keyword. So why not to say so? To compensate for the
severity of this restriction that prevents useful indirect eval calls
the spec may add an explicit function with the semantics of the
indirect eval, like compute.

Regards, Igor


More information about the Es-discuss mailing list