[dojo-contributors] Asynchronous Module Definition (was Re: [CommonJS] Another idea on unifying Transport/C and /D)

James Burke jrburke at gmail.com
Wed Oct 13 14:04:40 EDT 2010

On Wed, Oct 13, 2010 at 10:44 AM, Kris Zyp <kriszyp at gmail.com> wrote:
> Any sane module loader is going to provide a bootstrap. By reserving the
> "require" global, module loaders are free to use it for that purpose,
> like RequireJS does. Certainly this is the most natural, and intuitive
> way to do the bootstrap, what is wrong with that?

I would assume that the bootstrap call would be actually specified in
a CommonJS spec/proposal at some point, since the goal would be to
allow interop between implementations. While it may not be part of the
specific AMD spec, it would be part of creating a complete, compliant
loader.  To me, that bootstrap call makes sense to be part of require.

So require would not be a completely free space for a module loader to
use, the bootstrap call would be reserved. It could be that the
bootstrap call is part of require() itself, like require([]) used in
RequireJS, but it is still a restriction on require. So it seems fine
to have require.def reserved too.


More information about the dojo-contributors mailing list