Default exports, without explicit syntactic support
Marius Gundersen
gundersen at gmail.com
Thu Jun 26 06:54:53 PDT 2014
On Thu, Jun 26, 2014 at 3:39 PM, Kevin Smith <zenparsing at gmail.com> wrote:
>
> The underlying problem is default exports - it's just plain confusing to
> users.
>
>
I agree
What do you think? Is there any user experience issue here that needs to
> be sugared over?
>
> Notice that, on the import side, *exports overriding in Node is an
> equivalent user experience to normal importing in ES modules*.
>
> Therefore, my conclusion is that syntactic support for "default exports"
> does not provide any measurable improvement in user experience. On the
> other hand, default exports is clearly confusing to users. The balance
> seems clear to me: default exports needs to be dropped from the design.
>
> Feedback? Counter-arguments?
>
I think this is a great suggestion.
The only thing I want to add that it should be possible to import the
collection of exports (the bag) and named values from the bag:
```js
import _, {map, reduce, filter} from "underscore";
assert(_.fiilter === filter);
```
Marius Gundersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140626/849860de/attachment.html>
More information about the es-discuss
mailing list