While I'm at it (and feel free to direct me to the archives if this has already been discussed):
Say I'm developing a library, and I have two files with one module per file, like this: /project a.js b.js How would I bring "b" into "a"? Like this? // a.js module a { module b = "b.js"; } Or would I use "import" like the file system modules<http://wiki.ecmascript.org/doku.php?id=strawman:simple_modules_examples#filesystem_modules_for_offline_es>example? Thanks again. On Tue, Dec 28, 2010 at 12:09 PM, Mark S. Miller <erig...@google.com> wrote: > On Tue, Dec 28, 2010 at 8:06 AM, David Herman <dher...@mozilla.com> wrote: > >> We would probably make it a contextual keyword so you could still use it >> in non-expression contexts (e.g., to the right of '.' and left of ':' in >> object literals), but unless we played some clever tricks, which I'm not >> sure would be worth it, using it as an identifier would be a syntax error. >> Harmony will be opt-in, though, so this won't cause existing code to break >> unless the author explicitly changes the language; at which point they would >> get an early error and have the opportunity to rename the identifiers. >> > > Nit: All identifiers including all keywords can already be used after a '.' > or before a ':' in object literals. > > > > >> >> Dave >> >> On Dec 28, 2010, at 7:34 AM, Kevin Smith wrote: >> >> > In the modules strawman, "module" is a keyword, right? Will code that >> uses "module" as an identifier most likely cause a syntax error? >> > >> > Thanks! >> > _______________________________________________ >> > 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 >> > > > > -- > Cheers, > --MarkM >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss