In what ways does the following "eval" regularity break?

liorean liorean at gmail.com
Thu Oct 30 06:41:02 PDT 2008


Why not introdouce one localEval that evaluates in local scope but
does not allow modifying the local scope, a globalEval that evaluates
in the global scope, and maybe an expressionEval which allows
anonymous function literals and parses { as the beginning of an object
literal instead of a block statement?

That should cover current usage of eval except for the case of wanting
to inject variables into the scope. Which would mean dropping eval in
strict mode isn't that awful an idea.
-- 
David "liorean" Andersson


More information about the Es-discuss mailing list