The 1JS experiment has failed. Let's return to plan A.

Brendan Eich brendan at mozilla.com
Wed Dec 26 14:58:17 PST 2012


Mark, you cite some issues we need to work through, but opt-in via 
pragma syntax beyond "use strict" is not one of them.

What's more, the big-picture claim in your Subject line ("has failed" 
especially) is not true. In an overriding sense, 1JS can't fail, because 
versioning is an anti-pattern (or at best retrospective, not 
prescriptive) on the web. To be more precise, ES6 will fail if it 
requires opt-in versioning apart from the new syntax itself. This 
applies to "use strict" too, since it has costs (both performance and 
semantic changes that double testing while old browsers are in the field).

Now, on the specific JSC bug you cite, 
https://bugs.webkit.org/show_bug.cgi?id=27226. This is actually from 
2009, filed based on a misunderstanding of ES3 and not on any real-world 
web content, and finally marked invalid in February. It is old news. The 
comments from February do not prove that "[t]he 1JS experiment has 
failed". And JSC design decisions are not authoritative over TC39 as a 
whole -- rather, the reverse!.

Anyway, we can certainly make function-in-block ES6 semantics require 
"use strict" opt-in, but that will both diminish the use-frequency of 
function-in-block with sane and standard semantics, and as Andy Wingo 
pointed out in the JSC bug, confuse users with two semantics for the 
same syntax.

More in reply to Brian Terlson's thread.

/be



More information about the es-discuss mailing list