block scope + direct non-strict eval

Andreas Rossberg rossberg at
Tue Jan 31 10:59:48 PST 2012

On 31 January 2012 19:23, Brendan Eich <brendan at> wrote:
> I bet the "mode" was what got Sam's attention (mine too) in your "classic
> mode". We are not making hard mode walls or version opt-in. No engine will
> have a mode enum that must be advanced (implicitly or explicitly) and
> checked in order to tell what to do in unversioned script. Or so we think!

I'm afraid that I still fail to get this argument. When you compile an
individual function in ES6, you will need to have a 3-valued enum
around saying whether it resides "in strict scope", "in non-strict
scope", or "in module scope". Similarly, if you are human and read a
piece of code. No news there. Whether that is called "mode" or
"context" or something else seems pretty much immaterial.

(I'm saying 3-valued, because Dave was alluding to additional static
checks inside modules. It may be that 2 values keep being enough.)


More information about the es-discuss mailing list