ImportSpecifierSet syntax
The problem is that you have to bite the bullet of syntactic inconvenience for either default imports or normal imports. I’d prefer the syntax you suggested, but there seem to be many people who want to make default imports as simple as possible.
Oh, I forgot about that wart.
Erik Arvidsson wrote:
Oh, I forgot about that wart.
Are default imports a wart no matter the syntax, or only because of this brace imposition issue you've identified? If the latter, perhaps there is another solution that gives us win-win.
On Sun, Sep 8, 2013 at 11:55 AM, Erik Arvidsson <erik.arvidsson at gmail.com> wrote:
I'm proposing we remove these curly braces, giving:
import a as b, c as d from "e";
Subjectively, this is really hard to read, versus the curlies which provide a visual boundary (also subjective)
Axel wrote:
The problem is that you have to bite the bullet of syntactic inconvenience for either default imports or normal imports.
Correct. This is the #1 justification.
Rick wrote:
Subjectively, this is really hard to read, versus the curlies which provide a visual boundary (also subjective)
I also agree with this. Too much word-based syntax without any sigils becomes hard to distinguish.
On Sep 8, 2013, at 12:45 PM, Brendan Eich <brendan at mozilla.com> wrote:
Are default imports a wart no matter the syntax, or only because of this brace imposition issue you've identified? If the latter, perhaps there is another solution that gives us win-win.
Best of luck. :) We've spent a long time in this space, considered many competing constraints, and we've settled on a good spot with the syntax. I'm not interested in spending more time on it.
David Herman <mailto:dherman at mozilla.com> September 11, 2013 10:24 AM
Best of luck. :) We've spent a long time in this space, considered many competing constraints, and we've settled on a good spot with the syntax. I'm not interested in spending more time on it.
I'm not either, but perhaps Arv or someone else is -- otherwise I agree we should close this out, and not worry about it.
Yeah, I don't think there is time to get this resolved.
it is a minor issue and not worth worrying about.
harmony:modules#syntax
Currently ImportSpecifierSet is proposed to start with "{" and end with "}". This made a lot more sense when we reused the destructuring syntax. Now that we are using "as", these curlies look like a remnant from the past.
import {a as b, c as d} from "e";
I'm proposing we remove these curly braces, giving:
import a as b, c as d from "e";
Same issue applies to ExportSpecifierSet.