documentcloud/underscore — comment on commit 0d4b1247c45083c695cab4242c084a97aa600221
File:  line 0
By jrburke:

@xcambar: I'm not sure I follow your comment, but the global registration needs to be there when an amd loader loads underscore and another script that depends on underscore but does not been call define() for their dependencies. For instance, backbone/master.

If underscore only calls define in that case and does not export a global, then an error occurs. It is also useful when multiple versions of underscore could be loaded on a page (even outside an amd loader), but the loader may only want one of them. If the underscore definition disappears into define, another script that wanted to use it as a global would have a problem.

Basically the same forces are at play for underscore as they are for jQuery, so the same pattern is used. Most other libs do not have this problem though. It just happens to be that underscore and jQuery are really popular, and modular loading is really new for most developers.

If you want to talk about it more, it is probably best to do outside of this commit, to avoid the extra noise for the underscore collaborators.