I agree with Alex.

We can tolerate this syntactic form being dropped for now, but that doesn't
eliminate the semantic need.  If the "module" contextual keyword is a
problem, then we should be able to come up with another color for the
bikeshed, e.g.:

    import "foo" as foo;


As an aside, it is yet to be seen whether the "default" export thing is the
best way, or the bad part itself.  We don't have the real world experience
yet to answer that.



On Mon, Jun 9, 2014 at 2:39 AM, Axel Rauschmayer <a...@rauschma.de> wrote:

> Context:
> https://gist.github.com/caridy/eefb9b104874465d4e1c#1-moduleimport-syntax-importdeclaration
>
> ```js
> module foo from "foo"; // drop this
> import bar from "bar";
> ```
>
> I’m seeing the following contra against dropping ModuleImport syntax:
>
> > Contra: without a way to access the module object, it is difficult to
> deal with modules with many exports (e.g.: underscore), but we could fix
> this by using a reflective API to access imported modules
>
> Isn’t this a frequent use case? Which would lead to ugly and very
> inconsistent code, especially if multiple imports are involved. I also
> don’t see how CommonJS-style modules could be neatly migrated to ES6
> modules if this feature was dropped.
>
> I do agree that the ModuleImport reads a bit strange, but that could be
> fixed, e.g. via a suggestion I’ve seen somewhere:
>
> ```js
> import module foo from "foo";
> ```
>
> --
> Dr. Axel Rauschmayer
> a...@rauschma.de
> rauschma.de
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to