Module naming and declarations

Sam Tobin-Hochstadt samth at ccs.neu.edu
Wed May 22 03:31:21 PDT 2013


On Wed, May 22, 2013 at 11:27 AM, Andreas Rossberg <rossberg at google.com> wrote:
> On 21 May 2013 03:41, David Herman <dherman at mozilla.com> wrote:
>> On May 9, 2013, at 6:30 AM, Andreas Rossberg <rossberg at google.com> wrote:
>>
>>> In your scheme, I honestly cannot tell. Which ones are absolute
>>> logical module names, which ones are relative logical module names,
>>> and which ones are relative URLs?
>>
>> I realized I left this sub-thread hanging. While I think you've overstated your argument in several places, I do recognize that combining URL's and module names that look like paths into one syntactic space is confusing.
>>
>> But really, there was no real need for loading directly from a URL in the first place, since it's better practice to use an abstract name and configure it to the URL you want anyway. (If people really want the additional convenience they can configure the loader to accept URL's.)
>>
>> So the right resolution for this question is: the browser loader recognizes logical modules names only. No URI's, no URL's, just logical module name paths. If a particular module name needs to be loaded from a remote URL, you can use the ondemand configuration to map the logical name ("jquery") to the URL ("http://code.jquery.com/jquery-1.9.1.min.js").
>
> Of course, that is not the "right" resolution in my mind, but the
> wrong one entirely. ;)  Moreover, haven't you just pushed the problem
> to the ondemand API then? Or to "configured" loaders?

I recognize that it isn't the solution you want, but it is clearly a
solution, since it means there's no confusion between logical names
and URLs.  They appear on different sides in `ondemand`.

Sam


More information about the es-discuss mailing list