On 22 March 2012 10:23, Peter van der Zee <[email protected]> wrote:

> On Wed, Mar 21, 2012 at 11:28 PM, David Herman <[email protected]>
> wrote:
> > * importing with renaming:
> >
> >    import { draw: drawGun }    from "cowboy.js",
> >           { draw: drawWidget } from "widgets.js";
> >
>
> The brackets don't seem necessary (at least not from a parsing
> perspective). Maybe drop them?
>
> import draw: drawGun    from "cowboy.js",
>        draw: drawWidget from "widgets.js";
>
> If you fear that's too confusing with guards, replace the colon for an
> "arrow" (=>) or whatever. The bracket syntax is pretty confusing with
> object literal notation imo.
>

It shouldn't be too confusing, and the similarity is in fact intentional.
You should read import as destructuring (and export as the inverse
structuring, if you want).

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

Reply via email to