Simple Modules and Current Modules

Brendan Eich brendan at
Thu Nov 4 11:36:03 PDT 2010

On Nov 4, 2010, at 11:32 AM, Brendan Eich wrote:

> This Harmony script:
> <script type="harmony">
> var invariant = 99;
> module Foo = "foo";
> import;
> bar(invariant);
> </script>
> is not equivalent to anything like this:
> <script>
> var invariant = 99;
> requestModule("foo", function (Foo) {
> });
> </script>
> because invariant could be varied by a later script or event handler.
> This is precisely what I mean by "not possibly in the language currently".

Never mind the lack of TCP inherent in desugaring using function (no, we aren't adding Tennent-preserving lambdas).

I suggest not making cargo-cult idols of "what can be done in the language currently". It's great to innovate on the language. It's a terrible idea to make this the only possible future of the language, with only syntactic improvements.

The idol seems to have wings and a propeller, but it is made of palm fronds and it will not fly.


More information about the es-discuss mailing list