Why I was asking -- because I saw it in your talk on ES.next, where you used
exactly this approach, i.e. module Foo = http://modules.com/foo.js; --
without any `require`. That's it.
No problem, I didn't mean to chastise. Just trying to keep focussed.
(should I fix my following presentation
On Wed, Apr 6, 2011 at 8:25 AM, David Herman dher...@mozilla.com wrote:
Sure. Surface syntax isn't set in stone, but we aren't likely to go back to
just the string literal, since it looks too much like the module is being
assigned a string value.
I know you do not want to get into
Regarding, import M.* via destructuring, it's also arguable whether we
don't need it since it looks like a with.
I don't see any sense in which it looks like a |with|. It's both syntactically
and semantically different. Syntactically, because it's a global (or
module-global) declaration
On 04.04.2011 18:40, David Herman wrote:
Though the other question is: why do we need `require` at all?
Purely for syntactic/practical reasons. Let's not bikeshed.
Why I was asking -- because I saw it in your talk on ES.next, where you
used exactly this approach, i.e. module Foo =
On 03.04.2011 3:33, David Herman wrote:
Hi James,
1) Files as modules do not need module wrapper
Just to confirm, if a JS file contains only a module definition, the
module X{} wrapper is not needed?
That's correct.
2) Set module export value
Is it
On Sat, Apr 2, 2011 at 4:33 PM, David Herman dher...@mozilla.com wrote:
2) Set module export value
That said, we could consider adding functionality to make a module callable,
to address the use case you describe. Thanks for bringing this up.
Allowing a callable module
Hi James,
1) Files as modules do not need module wrapper
Just to confirm, if a JS file contains only a module definition, the
module X{} wrapper is not needed?
That's correct.
2) Set module export value
Is it possible to support setting the
On Apr 2, 2011, at 4:33 PM, David Herman wrote:
(We've talked a little bit about generalizing the `require' form to be an
expression operator that does a static module load, but I'm not sure whether
it hangs together.)
I don't see how we can reserve 'require' as a static (compile-time)
Fully agree on all counts.
Dave
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Brendan Eich bren...@mozilla.com wrote:
On Apr 2, 2011, at 4:33 PM, David Herman wrote: (We've talked a little bit
about generalizing the `require' form to be an expression operator that
I was looking over the harmony proposals around modules[1], module
loaders[2], and the module examples[3], and have some questions. These
questions come from making a module system/loader that works in
today's browsers/Node/Rhino, via AMD[4] and RequireJS[5].
1) Files as modules do not need
10 matches
Mail list logo