I'm happy this is finally receiving some comments. This is at the top
of my wish list for ESH.

I do agree that the current syntax seemed a bit off at first glance.
Now that Brendan pointed out that it is the destructuring pattern it
seems slightly better but still not perfect.

I also agree with others that having an explicit export list would be
useful. It is good practice to declare your imports and exports at the
top of the file.

On Sat, May 15, 2010 at 09:13, P T Withington <p...@pobox.com> wrote:
> Ah, destructing `.`, I missed that.  Perhaps I would have gotten it with a 
> closer parallel like
>
>  let { draw: d } = import M;

I don't like this since it makes it look like (import M) is an
expression that returns an object that is later destructured.

>
> or
>
>  import { draw: d } from M;

import {drawShape: draw} from Geometry;
import {drawGun: draw} from Cowboy;
import * from Math;

I like it. I think this one is clearer than the proposed "import
Geometry.{drawShape: draw}".

-- 
erik
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to