Subset relation (was: RE: ES3.1 Draft: 11 June 2008 version available)

Maciej Stachowiak mjs at
Mon Jun 16 22:08:29 PDT 2008

On Jun 16, 2008, at 8:09 PM, Mark S. Miller wrote:

> On Mon, Jun 16, 2008 at 2:45 PM, Mark S. Miller <erights at>  
> wrote:
>> On Mon, Jun 16, 2008 at 2:07 PM, Douglas Crockford
>> <douglas at> wrote:
>>> I agree that it is weird that ES4 wants to retain with, but that  
>>> in itself does not disturb the superset relationship.
>> Before we retreat into less formal notions of subsetting, could
>> someone please explain why ES4 wants to retain "with" in ES4 strict
>> mode?
> Given the silence, I thought it might be worth pointing out:
> * "Reformed with" was dropped from ES4 strict because it wasn't enough
> less horrible than "with" to be worth it. If "reformed with" isn't
> good enough, does anyone think "with" is somehow better than "reformed
> with"?
> * Given Brendan's and Maciej's clarifications, it seems that "with" is
> the *only* remaining feature of ES4 strict preventing static scope
> analysis.
> 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.

I can't speak for the main ES4 designers, and I don't personally see  
why "with" needs to be supported in strict mode. But I imagine the  
reasoning goes like this:

- Strict mode is a "good taste" mode, like Perl's "use strict", not a  
mode designed to give any specific guarantees about analyzability
- "with" is popular among JavaScript authors today, and even in JS  
libraries, so:
    - it would be hard to declare it beyond the boundaries of good taste
    - it would needlessly inhibit adoption of strict mode to have it

I would personally consider "with" to be in bad taste, notwithstanding  
its popularity.


More information about the Es4-discuss mailing list