> To me this is a bug not a feature; we should keep it simple and just have one
> way to get one import from one export.
>
> Just to make a connection to the topic, Dave's intro says:
> We've consistently seen confusion between the semantics of ModuleImport
> and default export.
>
> For me this confusion lands on default export equally as 'module` import.
Personally, I agree, but many people feel strongly about the single-export use
case. If default exports help with getting ES6 modules adopted more broadly
then the slight increase in complexity is worth it.
Let’s compare. Your approach – slightly more redundant:
```js
// MyClass.js
export class MyClass { ... }
// main1.js
import { MyClass } from "MyClass";
// myFunc.js
export function myFunc(...) { ... }
// main2.js
import { myFunc } from "myFunc";
```
Default exports:
```js
// MyClass.js
export default class { ... };
// main1.js
import MyClass from "MyClass";
// myFunc.js
export default function (...) { ... };
// main2.js
import myFunc from "myFunc";
```
--
Dr. Axel Rauschmayer
[email protected]
rauschma.de
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss