> No worries - the examples page is very useful.
> 
> In your original email:
> module Even = "http://example.com/even.js";;
> module Odd = "http://example.com/odd.js";;
> 
> Is the load keyword missing:
> module Even = load "http://example.com/even.js";;

Yes, sorry for another inconsistency there. FWIW, I'm not married to that 
particular syntax. I put the "load" keyword into the proposal just to emphasize 
that these strings correspond to a compile-time action (loading the bits). For 
example, consider:

    module M = load "http://example.com/foo.js";;
    module N = load "http://example.com/foo.js";;

These two modules are loaded from the exact same MRL, but the module system 
treats them as two completely separate, independent modules. (Even custom 
module loaders shouldn't be able to change this fact, since all they can do is 
deliver the bits of a module resource.)

The reason for this is that on the web, there's just no way to know that two 
URL's point to the "same" resource-- fetching the bit-for-bit-same URL even 
microseconds apart can result in completely different data, since web servers 
are free to deliver whatever they want. So the module loading semantics is 
resolutely non-clever about interpreting MRL's.

Dave

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to