`import` and aliasing bindings

David Herman dherman at mozilla.com
Fri Dec 28 10:42:30 PST 2012


On Dec 28, 2012, at 10:31 AM, Kevin Smith <khs4473 at gmail.com> wrote:

> However, I agree that the destructuring syntax for module imports may not be the clearest choice in terms of raising the right expectations. (As we have discovered already, it has other issues, namely people confusing the direction of renaming.) Maybe it is a bit too clever, and considering alternatives a worthwhile idea.
> 
> There's this:
> 
>     import x as y, a as b from "url";
> 
> But I find that much less readable than:
> 
>     import { x: y, a: b } from "url";

Right. It also gets more verbose very quickly.

> Destructuring syntax is what it is.  Developers just need to start reading it the right way.

Agreed.

Dave



More information about the es-discuss mailing list