Status of script loading in ecmascript

John J Barton johnjbarton at johnjbarton.com
Thu Nov 3 19:53:08 PDT 2011


On Thu, Nov 3, 2011 at 7:43 PM, Axel Rauschmayer <axel at rauschma.de> wrote:
>> Is there a summary of the current status of standardized dependency
>> based script loading somewhere? Since the sync and async camps of
>> commonJS were unable to agree, we left with two sets of incompatible
>> JS libs and a few gymnastic boilerplate adapters to bridge them.
>> Perhaps a standard could do no better, but one can hope.
>
>
> I think things are quite settled:
>
> Present: 2 standards – http://www.2ality.com/2011/10/amd.html
> - Asynchronous: Asynchronous module definitions (AMD): RequireJS (has an adapter for Node.js) etc.
> - Synchronous: CommonJS (Node.js etc.)

Exactly my point: these are not compatible so libs like q.js have to
add 18 lines of goop and a throw based workaround, see:
https://github.com/kriskowal/q/blob/master/q.js

>
> ES.next:
> http://wiki.ecmascript.org/doku.php?id=harmony:modules

I guess you meant:
http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders
but my question was more about whether this had any forward momentum,
implementations etc.

>
> What would you want to standardize? It would be great if Node.js adopted AMD,

Let's leave that discussion to commonjs.

> but at the very latest we’ll have a common standard via ES.next.

I'm wondering, given that I don't see any motion. Hence my query.

jjb


More information about the es-discuss mailing list