Subset relation (was: RE: ES3.1 Draft: 11 June 2008 version available)
Mark S. Miller
erights at google.com
Mon Jun 16 22:48:15 PDT 2008
On Mon, Jun 16, 2008 at 10:19 PM, Brendan Eich <brendan at mozilla.org> wrote:
> I am not going to repeat what I wrote at an earlier point in this thread (13
> June at 10:24) -- you didn't reply to what I wrote then. Did that message
> not reach you?
Are you referring to
It was the closest match I could find. I responded to this message.
What remaining point in this message do you feel still needs to be
addressed? I'm not being difficult. I just reread this message and
couldn't spot it.
>> If "reformed with" isn't
>> good enough, does anyone think "with" is somehow better than "reformed
> The question isn't whether an existing statement is "good enough", it's
> whether a strict mode that bans it is "usable enough".
A strict mode which doesn't ban is clearly not.
>> * Given Brendan's and Maciej's clarifications, it seems that "with" is
>> the *only* remaining feature of ES4 strict preventing static scope
> The global object still allows new names to be usable via lexical
> references, where the names were not bound at static analysis (compile)
If you get rid of "with", then the static analysis rule in ES4 becomes
very simple: all free variables in a program (script, compilation
unit, whatever) are global references, to be looked up as properties
of that program's global object, whether or not those properties are
>> If the ES4 folks still wish to include "with" in ES4 strict, perhaps
>> they can clarify what they see as the purpose of strict mode. Because
>> I'm completely baffled.
> Methinks you protest too much. You are right to point to reformed with,
> since it was my idea for making with tolerable to an earlier notion of 'use
> strict' -- strict mode as a verifier, which would need to see name bindings
> in order to do type checking.
> This old notion of strict mode was to be an optional feature, at the
> implementation's discretion. We dropped it in favor of 'use strict' a la
> Perl -- "use good taste and sanity".
And is "with" either in good taste or sane?
> Without type checking, the argument
> against unreformed 'with' is reduced to one about static scope -- but the
> global object still frustrates static scope,
The global object makes the contents of the global scope unknown. But
it does not ambiguate which variable name occurences are to be
interpreted as references into this global scope. Without "with", ES4
strict scopes would be statically analyzable. I'm surprised you're
willing to give that up.
> so is kicking 'with' out of
> strict mode worth it, especially if it impairs adoption of "use strict"?
Yes. Otherwise I don't see the point of "use strict".
More information about the Es4-discuss