On Wed, May 19, 2010 at 2:59 AM, Kevin Curtis <kevinc1...@gmail.com> wrote: > > For the following scenario: > <script> > module ModA = "http://acme.com/moda.js"; > module ModB = "http://acme.com/modb.js"; > ... source > </script> > > Both ModA and ModB use a utility module - that is the moda.js and > modb.js files both contain: > module ModUtils = "http://widgets.com/modutils.js"; > > I would have guessed that ModA and ModB are using the exact same > static utility module. Firstly for efficiency - "hey this source has > been fetched and compiled already".
The problem with this is that the web is not stable enough. First, is it based on the string in the URL? If so, then is "Widgets.com" the same as "widgets.com"? What about "www.widgets.com"? What if the url resolves to a different IP each time? Or if the source changes over time? We feel that it's a bad idea to try to use addresses on the web to determine identity of modules. Instead, we based the naming system on lexical scope, and let the programmer manage resources on the web. If you want to share a common library with your context, then you refer to it by name, and the context can provide it the module under that name. -- sam th sa...@ccs.neu.edu _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss