On Nov 2, 2011, at 3:00 PM, Nebojša Ćirić wrote:

> We were told (I think by Allen) that setting [[Extensible]] to true would 
> conflict in some way with ES6 modules. I do agree it's a big restriction to 
> set it to false given how JavaScript works today.
> 
> So the question is - are we going to have problems with ES6 Modules is we set 
> this property to true? If so, is there another way of solving this problem?

Do you mean, are you (or all of us working on Ecma TC39 standards) going to 
make Globalization name an ES6 module? But that doesn't seem necessary. Users 
should declare

module G11N from "@g11n";

or

import {foo, bar, baz} from "@g11n";

and name the module in whatever scope they want.

If we try to pre-declare the module and force the name to "Globalization", then 
I agree with Erik -- not only are we making it hard to polyfill for v2 when 
running on G11N v1 -- we are stepping on a name that may be in use.

/be


> 
> 02. новембар 2011. 14.12, Erik Arvidsson <erik.arvids...@gmail.com> је 
> написао/ла:
> The draft has the following:
> 6     The Globalization Object
> 
> The Globalization object is a single object that has some named properties, 
> all of which are constructors.
> 
> The value of the [[Prototype]] internal property of the Globalization object 
> is the built-in Object prototype object specified by the ECMAScript Language 
> Specification. The value of the [[Extensible]] internal property is false.
> 
> This seems very bad and counter intuitive to how the web works. It would mean 
> that there is no way to fix the Globalization object for browsers that are 
> not fully up to date. Lets assume that in a future version of the spec the 
> Globalization object gains a new property. The standard way to handle this in 
> JS is to do:
> 
> if (!Globalization.newProperty) {
>   Globalization.newProperty = ...;
> }
> 
> This allows people to migrate to new features and it is how people gradually 
> started to use Array extras.
> 
> -- 
> erik
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 
> 
> 
> 
> -- 
> Nebojša Ćirić
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to