Newly revised Section 10 for ES3.1.
brendan at mozilla.org
Thu Jul 10 00:26:34 PDT 2008
On Jul 9, 2008, at 11:59 PM, Brendan Eich wrote:
> As for new syntax not involving new keywords, and new library APIs,
> we have talked about supporting these additions in the default
> version, since doing so cannot break existing code.
This is not true of ES4, although it's true we have talked about
trying to unconditionally add properties. The problem is that if
existing code object-detects a new API property, expecting its own
same-named (but possibly very different) method or value, it could
use an ES4 namesake and go very wrong.
ES4 as proposed uses the __ES4__ namespace to hide new names from the
default version. Opting into ES4 opens the __ES4__ namespace. This is
in the docs on http://ecmascript.org/ and the draft specs that have
been circulated. There may be problems yet to solve with this
approach, but it's a bona fide attempt to avoid potentially breaking
property additions to standard objects.
More information about the Es4-discuss