On May 24, 2011, at 6:20 AM, Andreas Rossberg wrote:

> - Treat projection from a module M (which we can distinguish
> statically) specially. If we project a yet unclosed function:
>  * if it's called right away, pass M.Env as the environment,
>  * if it's not called, allocate a proper closure for it with environment 
> M.Env,

This is already done by SpiderMonkey and I believe other engines, with function 
expressions in certain contexts.

Not to rain on the module function parade (I'm leaning away from classes, in 
search of simpler solutions that compose well, so I have a soft spot for it), 
but reifying the module as an object with its exports as properties means those 
properties are non-configurable and non-writable. That goes against the 
classes-as-sugar-for-prototypal-objects goal. The -prototypal part is missing 
too.

/be

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to