simple modules

Brendan Eich brendan at
Tue Feb 2 13:21:04 PST 2010

On Feb 2, 2010, at 1:11 PM, Mark S. Miller wrote:

> On the other hand, the second class "simple modules" proposal, plus  
> the impending Context proposal, allows A and subset-A, as far as I  
> can tell. But I'll let others say more.
> Perhaps other's aren't seeing the problem with A that I am seeing:  
> mutable static state.

No, we all get that. Sam addressed it, others have too (Kevin Curtis,  
Ihab of course, and I tried although perhaps I was unclear).

> See <>  
> and <> for  
> many software engineering benefits of avoiding mutable static state.  
> As Gilad says,
> Given all these downsides, surely there must be some significant  
> upside [to mutable static state], something to trade off against the  
> host of evils mentioned above? Well, not really. It’s just a  
> mistake, hallowed by long tradition. Which is why Newspeak has  
> dispensed with it.
> If Gilad is right, then it is a mistake for Harmony as well.

And if he's wrong, then...

I prefer to let Newspeak be Newspeak, and not try to force JS to fit a  
different mold. Fixing a mistake such as the arguments object  
(with and the spread operator), sure. "Fixing" the language,  
say by never adding anything like a module system where the top  
lexical frame of the module has mutable bindings, is not obvious a  
fix. Many would call it a bug.

> I believe it is. But as long as Harmony's module system admits a  
> subset which enforces the absence of static state, I'm happy enough.


Agree we should try to avoid two layers, but we already have "the full  
language" and SES. I'm skeptical (and I've said so!) that we can build  
one module system for SES and find it usable for the full language,  
but let's keep discussing.

I'd rather see alternative designs explored and common vocabulary and  
understanding built up, so we can avoid missing something in an  
exclusively bottom-up or top-down design exercise. So, grumpiness  
aside, I'm delighted to see active discussion and multiple proposals.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list