whatwg / loader

Loader Standard
https://whatwg.github.io/loader/
Creative Commons Zero v1.0 Universal
609 stars 45 forks source link

Will name resolution dictate forward slashes? #39

Open johnjbarton opened 9 years ago

johnjbarton commented 9 years ago

As far as I can gather, the current consensus is for module keys to be absolute URLs. Ignoring the issue of URLs vs module identifiers, is there at least agreement that the paths are separated by forward slashes?

caridy commented 9 years ago

why will that matter? In theory those are internal operations, and the loader can probably rely on the runtime configuration.

johnjbarton commented 9 years ago

For dynamic loading, developers will want to rely on string manipulation libraries for constructing module specifiers. In tools that iterate over the loaded modules, the keys will need to be converted into values that can be fetched. Of course the internal format of the keys should not be part of the spec, but the API should dictate the form of module specifiers, any other inputs to the names, and the format of keys coming back out. Specifying forward slashes would be a great help to developers with almost no cost and few downsides in practice.