Module Comments

Herby Vojčík herby at mailbox.sk
Wed Dec 5 22:41:52 PST 2012



David Herman wrote:
> On Dec 5, 2012, at 7:16 PM, Kevin Smith<khs4473 at gmail.com>  wrote:
>
>> 3) I'm just OK with "as".  Note that it inverts the position of the string and the binding:
>>
>>      import { x } from "goo";
>>      import "ga" as ga;
>>
>> Which makes it harder to read when you have a bunch of imports mixed together.  It's harder for the eyes to scan back and forth.
>
> Yeah, that's the known downside to this syntax. We've been around this block so many times, and it's just one of those things that will end up with bikeshed colored not in paint but in blood. I'm open to alternative suggestions but not to endless discussion (it goes nowhere).
>
> The alternative of
>
>      import ga = "ga"
>
> has the problem of looking like it's saying that ga is a string.
>
> The alternatives of
>
>      import ga = module("ga")
>
> or
>
>      import ga = (module "ga")
>
> have the problem of making it look like the RHS is an expression.
>
> Feel free to suggest alternatives, but forgive me if I'm not willing to respond to every opinion on this one. :}

import x from "goo";
import ga for "ga";

import x from "goo";
import ga "ga";

> Dave

Herby


More information about the es-discuss mailing list