Claus Reinke (2013-05-04T08:04:22.000Z)
> 0. No effort: modules are loaded relative to the document base url,
> with ".js" appended. So `import "jquery"` maps to the relative URL
> "jquery.js".
> 
> 2. A few lines: you can use System.ondemand() to set the URL for each
> module you use. If you call
> `System.ondemand({"https://example.com/jquery-1.9.1.js": "jquery"})`
> then `import "jquery"` maps to the URL you specified (imports for
> modules that aren't in the table will fall back on the loader's
> baseURL).

I think part of Andreas' concerns was that you now have a conflict
between 'import "jquery"' referring to a relative (0.) or registered (2.)
thing, because all names just look URL-ish. Another part was that
both times, the import may look URL-ish but doesn't behave like one.

Using something like 'import "registered:jquery"' for 2 would
remove the conflict, without changing the functionality. That would
still leave the implicit rewriting involved in 0 - perhaps one could
specify that every protocol-free name refers to a module (with
rewriting) and names with protocol prefixes refer to URLs?

Claus
github at esdiscuss.org (2013-07-12T02:27:20.725Z)
> 0) No effort: modules are loaded relative to the document base url,
> with ".js" appended. So `import "jquery"` maps to the relative URL
> `"jquery.js"`.
> 
> 2) A few lines: you can use `System.ondemand()` to set the URL for each
> module you use. If you call `System.ondemand({"https://example.com/jquery-1.9.1.js": "jquery"})`
> then `import "jquery"` maps to the URL you specified (imports for
> modules that aren't in the table will fall back on the loader's
> baseURL).

I think part of Andreas' concerns was that you now have a conflict
between `import "jquery"` referring to a relative (0.) or registered (2.)
thing, because all names just look URL-ish. Another part was that
both times, the import may look URL-ish but doesn't behave like one.

Using something like `import "registered:jquery"` for 2 would
remove the conflict, without changing the functionality. That would
still leave the implicit rewriting involved in 0 - perhaps one could
specify that every protocol-free name refers to a module (with
rewriting) and names with protocol prefixes refer to URLs?