Axel Rauschmayer axel at
Thu Jun 19 02:03:03 PDT 2014

That’s a good solution. Logically, `import { * } from "fs"` may make more sense, but I prefer the “unbraced” asterisk, because it results in less clutter.

Does the proposed syntax clash with `export * FromClause` (which, I’m assuming, re-exports everything, not just the named exports)?

I’d prefer it if named exports and a default export were mutually exclusive, but I understand that is off the table(?) Which is also fine with me…


On Jun 19, 2014, at 10:15 , David Herman <dherman at> wrote:

> ## Proposal
> OK, so we're talking about a better syntax for importing a module and binding its named exports to a variable (as distinct from importing a module and binding its default export to a variable). Here's my proposal:
> ```js
> import * as fs from "fs"; // importing the named exports as an object
> import Dict from "dict";  // importing a default export, same as ever
> ```

Dr. Axel Rauschmayer
axel at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list