indirect eval spec too severe?

Brendan Eich brendan at
Sat Jan 24 19:29:37 PST 2009

On Jan 24, 2009, at 4:51 PM, Mark Miller wrote:

> The current spec language allows the global eval property to be, in
> effect, either mutable or not, benefiting no one. If we need to allow
> correct programs to be able to mutate it (in an initial environment in
> which it has not yet been frozen), then we should change the spec to
> require it to be initially mutable, so that correct programs can rely
> on this.

ES3 already requires eval to be a mutable global property, chapter 15  

Every other property described in this section has the attribute  
{ DontEnum } (and no others) unless otherwise specified.

Postel's Law means real code depends on this. Proving it is impossible  
but you can't cite absence of evidence to prove evidence of absence of  
eval overwriting.

The idea of changing eval's attributes seems unmotivated, since we  
don't need to incompatibly change ES3 to preserve the "operator eval"  
behavior everyone wants. Unless there is a real problem not solved by  
the notions in the current spec (based on some implementations and on  
ES4) then we should not change global property attributes. There's too  
much opportunity for incompatible (silent failure to overwrite)  

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

More information about the Es-discuss mailing list