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
[email protected]
rauschma.de



_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to