Modules: Name capture

David Herman dherman at mozilla.com
Wed Jun 2 10:38:28 PDT 2010


> Sorry for the slow reply -- was sick....

No worries-- hope you're feeling better.

> Years of PL research and experience have demonstrated that explicit linking tends to be unwieldy and inconvenient.
> 
> That needs to be added to my reading list. Cite away! :)

ML is dead; what more evidence do you need? ;)

Really, though, the research literature on modules is enormous. I don't have the time or inclination to provide a full bibliography. Personally, I've worked with several advanced, explicitly-linked module systems, including ML functors and PLT Scheme units.

> With concise object literals, would that not be:
> 
>     module Even = load 'even.js' with { Odd };
>     module Odd = load 'odd.js' with { Even };

Possibly, depending on whether you want to present modules to themselves as well.

But really, I've seen it before: these kinds of specification languages for module graphs spin out of control. You'll wish you had the ability to abstract the thing on the RHS of "with" -- and then you'll have to introduce the complexity of compile-time bindings of module graphs, and figure out how to shoe-horn those into the existing syntax and semantics. Or, you'll hold the line and force programmers to keep writing out the full module graph over and over again, in which case they just won't ever use modules at all.

> But seriously: I am not *necessarily* suggesting explicit linking (however defined). I am pointing out the necessary consequences of a dangerous design that promises more than it can deliver.

You've not demonstrated that.

Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20100602/983f27d3/attachment.html>


More information about the es-discuss mailing list