Allen Wirfs-Brock (2013-04-16T18:17:47.000Z)
On Apr 16, 2013, at 10:54 AM, Kevin Smith wrote:

> 
> 
> OK, you asked for it. How exactly is that superior to
> 
>   export let it = f(1, 2, 3)
> 
>   import it as foo from "foo"
> 
> which is both shorter and does not need any extension to the syntax at all?
> 
> 
> It is seen as a deficiency (anti-idiomatic?) by some members of the development community to have to rename the "one thing" at all.  I remain on the fence about it.  Maybe developer outreach would be more effective than syntax, in this case?

But in this case the "one thing" doesn't actually have a pre-existing name so nothing is being renamed.

Also, if the export keyword  is currently always followed by a declaration keyword (let, const, class, function) there would seem to be a good chance that syntactically no second keyword could be interpreted as an implicit let (or const), so:

export foo = f(1, 2, 3);  //means same thing as: export let foo = f(1,2,3)

I haven't actually analyzed the grammar implications, but it seems  plausible. 

Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130416/3f4ddbb4/attachment.html>
github at esdiscuss.org (2013-07-12T02:26:56.703Z)
On Apr 16, 2013, at 10:54 AM, Kevin Smith wrote:

> OK, you asked for it. How exactly is that superior to
> 
>     export let it = f(1, 2, 3)
> 
>     import it as foo from "foo"
> 
> which is both shorter and does not need any extension to the syntax at all?
> 
> 
> It is seen as a deficiency (anti-idiomatic?) by some members of the development community to have to rename the "one thing" at all.  I remain on the fence about it.  Maybe developer outreach would be more effective than syntax, in this case?

But in this case the "one thing" doesn't actually have a pre-existing name so nothing is being renamed.

Also, if the export keyword  is currently always followed by a declaration keyword (`let`, `const`, `class`, `function`) there would seem to be a good chance that syntactically no second keyword could be interpreted as an implicit `let` (or `const`), so:

    export foo = f(1, 2, 3);  //means same thing as: export let foo = f(1,2,3)

I haven't actually analyzed the grammar implications, but it seems  plausible.