James Burke jrburke at
Thu Jun 19 12:59:42 PDT 2014

On Thu, Jun 19, 2014 at 12:13 PM, Domenic Denicola
<domenic at> wrote:
> From: es-discuss <es-discuss-bounces at> on behalf of James Burke <jrburke at>
>> 1) Only allow export default or named exports, not both.
> As a modification of the current design, this hurts use cases like
> ```js
> import glob, { sync as syncGlob } from "glob";
> import _, { zip } from "underscore";
> ```

It is just as likely the module author will specify sync and zip as
properties of their respective default export. Particularly since
those are coming from JS modules that come from existing module

So a destructuring assignment would be needed, following the default
import. It works out though, and is not that much more typing. That,
or those pieces would be available as ‘underscore/zip’ or ‘glob/sync'

The argument for allowing both a default and named exports seems
ill-defined based on data points known so far, and by avoiding it, it
reduces the number of import forms and aligns better with
System.import use.


More information about the es-discuss mailing list