ES Modules: suggestions for improvement

Brendan Eich brendan at mozilla.org
Wed Jun 27 09:39:24 PDT 2012


Isaac Schlueter wrote:
> I think a stand-up fight about this sounds wonderful.

Ok, great. But:

> I am not at all convinced that typo-checking is anywhere near worth
> the price tag, or is even a problem.  Most of the alleged needs for
> type-checking are a bit dubious to me; that's not really what JS is
> all about.

This is not stand-up fighting.

First, what we propose is not type-checking. Names are not types. It's 
not even structural record typing, one level deep. We're talking about 
the same checking done to make sure

var foo = 42;
... foop ...

throws at runtime in ES1-5 if evaluation reaches the foop use, and (if 
you wrap a module around that hunk of code, and there's no global foop 
property) at compile-time (EarlyError) in ES6.

Second, you are "not at all convinced". Ok, that's either attitudinizing 
and padding an already long reply, or a line in the sand that doesn't 
say how you would be convinced, so unanswerable.

Third, "what JS is all about" arguments fall into the endless 
meta-discussion "Ugly" talking points I decried at the

http://brendaneich.com/brendaneich_content/uploads/TXJS-Talk.012.png

slide in this talk:

http://brendaneich.com/2011/08/my-txjs-talk-twitter-remix/

We will never agree on "what JS is all about".

Let's please instead argue about exact semantics of the proposals, so we 
have a hope of even talking about the same thing.

Then we should try to agree on gaps in the language to fill.

You seem to say lack of typo checking is not a gap in the language. Is 
this a fair statement?

Stopping here, to avoid ever-increasing message length. Also because we 
need to agree on stand-up fighting rules.

/be


More information about the es-discuss mailing list