On Nov 24, 2011, at 7:37 AM, David Bruant wrote: > Le 24/11/2011 16:04, Sam Tobin-Hochstadt a écrit : >> You can't do the following: >> >> import {new, delete} from "@reflect"; >> >> because you can't bind `new' and `delete'. Even if this were allowed, >> then `new(...)' would still be a syntax error. > Oh ok... It actually is more an issue of destructuring than modules > themselves.
Sort of. It's not even really technically a problem with destructuring; we could allow that, but it would be useless, because you'd never be able to refer to them. > Interestingly, it means that as soon as we have the module syntax out > there, there will be pretty much no way to add a new reserved keyword > (ever?), because someone may be using the identifier and adding the > reserved keyword would break the module import. This has nothing to do with modules. Adding a reserved word is *always* backwards-incompatible because someone could already be using it as a variable. Modules don't change this situation at all. > "import Reflect from "@reflect"" Almost. module Reflect from "@reflect"; You only use "import" to pull out exports from inside a module. (We've been experimenting with alternative syntaxes, btw. I'll report back on that soon.) Dave _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss