Module naming and declarations

Andreas Rossberg rossberg at google.com
Wed May 22 04:26:22 PDT 2013


On 22 May 2013 13:11, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> On Wed, May 22, 2013 at 12:05 PM, Andreas Rossberg <rossberg at google.com> wrote:
>> On 22 May 2013 12:55, Brendan Eich <brendan at mozilla.com> wrote:
>>> Andreas Rossberg wrote:
>>>>
>>>> I suppose you are right for ondemand, but it doesn't apply to the
>>>> "configuring the loader to accept URL's" case Dave was alluding to,
>>>> right?
>>>
>>>
>>> Finally I believe I've caught up and can jump in and answer: right! (Bracing
>>> for impact!)
>>>
>>> However, the other way than ondemand to use a URL remains: <script src=...>.
>>
>> Doesn't really help, since you can't load a module file through a
>> script tag.
>
> I don't understand what you mean here.  A <script> tag can certainly
> contain a module declaration.  That's a big advantage of having
> syntactic support for module declarations.

A <script src=...> cannot refer to a _module_, only a _script_
defining a module. The point of using URLs would be that you do the
former, no?


>> Also, script tags introduce staging, which Dave considers
>> essential avoiding.
>
> No, Dave's point is that _requiring_ staging is a bad idea.  Having
> multiple script tags is a common practice, not a bad idea to be
> avoided.

Sure, I was referring to the context of the other subdiscussion about
linking. In that context you want to avoid extra staging.

/Andreas


More information about the es-discuss mailing list