Modules: Curly Free

Brendan Eich brendan at mozilla.com
Sun Apr 21 09:42:57 PDT 2013


No.

/be

Claus Reinke wrote:
>> Anonymous export is simply about allowing library authors to indicate 
>> a module's main entry point. Semantically, we're talking about the 
>> difference between a string and a symbol; syntactically, we're 
>> talking about one production. It's all cleanly layered on top of the 
>> rest of the system. Let's keep some perspective.
>
> If you put it like this ("entry point"), it recalls another issue, namely
> that of scripts-vs-modules (executable code vs declaration container).
>
> Would it be possible to combine the two issues, with a common
> solution?
> Something like: modules are importable and callable, importing a 
> module gives access to its (named) declarations but doesn't run any 
> (non-declaration) code, calling a module gives access to a single 
> anonymous export (the return value) while also running any 
> non-declaration code in the module.
>
> Claus
>
>
>


More information about the es-discuss mailing list