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.
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
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;
}
There's some flexibility built in to the system via module loaders. The
filesystem modules example is hypothetical; it assumes a built-in module
loader that maps files available on the filesystem to corresponding
pre-defined, nested modules.
On the web, you would do almost as you suggest:
//
Sweet - I was hoping that the module wouldn't have to name itself.
My next question has to do with bundling. Let's say I want to bundle a.js
and b.js into a single file, with the exports of a.js providing the exports
of this bundled thing. I suppose I could wrap both of the individual
modules
I'm not quite sure I understand the scenario you're describing. Do you mean
that we dump the contents of a.js and b.js into all.js and delete the first two
files? In that case you can do:
// all.js:
export module a {
export module b {
// original b.js contents ...
Ah - that's much more elegant. Let me see if I can describe better though.
I want to keep my library in source form as separate modules (one module per
file, probably). I'll do development and testing that way. But I want to
distribute my library as a single file. Presumably I'll need some
The mechanism to include a script is outside the language. Different
environments have different mechanisms to do this. For example, in
HTML you include scripts using script tags.
On Sun, Dec 26, 2010 at 05:46, Giuseppe Luigi Punzi
glpu...@lordzealon.com wrote:
Hi all,
Merry Crishmas for all
Hi Lasse,
Thank you for the comprehensive list!
In all these cases we should perhaps first attempt to determine whether these
could just be considered spec compliance issues that ought to be fixed in
implementations. If retaining compatibility with existing code is going to
require continued
Hi,
In the definition of OctalEscapeSequence, and in the accompanying semantics, it
is required at numerous points that the subsequent character is not a
DecimalDigit:
OctalEscapeSequence ::
OctalDigit [lookahead ∉ DecimalDigit]
ZeroToThree OctalDigit [lookahead ∉ DecimalDigit]
10 matches
Mail list logo