From: [email protected] [[email protected]] on behalf of Sam Tobin-Hochstadt
[[email protected]]
> There's a default place to fetch files from, because there has to be _some_
> default.
Why?
This is the core of my problem with AMD, at least as I have used it in the real
world with RequireJS. You have no idea what `require("string")` means---is
`"string"` a package or a URL relative to the base URL? It can be either in
RequireJS, and it sounds like that would be the idea here. Super-confusing!
I think it would be better if `import "string"` simply did not work by default
(threw an error at the resolution stage, for example), unless a named module
was already loaded with that name. Then the only behavior that would work by
default, when not using named modules, is relative module names, and maybe
absolute URLs (URIs?).
This would make it much clearer that `import "string"` is the purview of named
modules (= concatenated builds) or custom resolve hooks. When reading code that
does `import "backbone"`, you would know the string `"backbone"` has meaning
only from some external agency, and is not something you should go hunt around
on disk for next to your index.html.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss