Kevin Smith zenparsing at
Thu Jun 26 20:42:02 PDT 2014

> To me, though, that goes back to the destructuring/not destructuring
> aspect. Maybe this has floated by during the bikeshedding, but why not
> something like:
>     //import a single named export
>     import foo from "bar";
>     //import multiple named exports
>     import foo, baz from "bar";
>     //alias an imported named export
>     import foo as fooAlias from "bar";
>     //import the module
>     import "bar" as bar;
: )

I tried this out in a parser and in real code, and was only moderately
happy with the result.  I find that I prefer the curlies.

Bikeshedding aside, I think we pretty much agree across the board that the
current setup which attaches special importance to a "default" export is
confusing and suboptimal.  It is clear to me that it does not satisfy the
constituents that it is meant to satisfy.

I agree with Russell that the only way to make "default" work is to have
override semantics.  That is, the user must be allowed to "override" the
module instance object somehow.  Since that approach is inherently "hacky",
I doubt it will get consensus in TC39.

With those two facts in mind, I think we need to see evidence that the
"default" feature provides *more than marginal gains* in terms of user
experience.  If such evidence cannot be produced, then the "default"
feature does not carry its weight and must be removed.

So.... what's the evidence?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list