The module system was designed to make it as easy as possible to use, both for general ease of use and to encourage modular programming. Once you move to an approach where programmers have to write their own linking specifications, it tends to get much more complicated. When you make modules more complicated to use, people don't use them.
Module loaders do give you the ability to do dependency injection, though, by changing the semantics of module URL's. Dave On Apr 10, 2011, at 9:50 AM, Axel Rauschmayer wrote: > I'm not sure how this would be done best or how useful it would be, but: has > dependency injection been considered as a use case for modules (e.g. to swap > modules during testing)? > > One possibility might be to give modules parameters that module clients have > to provide. > > Axel > > -- > Dr. Axel Rauschmayer > > a...@rauschma.de > twitter.com/rauschma > > home: rauschma.de > blog: 2ality.com > > > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss