Matthew Robb (2015-02-19T14:22:18.000Z)
Why not simply

import a from "a";
import b from "b";

export { a, b };
On Feb 19, 2015 8:18 AM, "Jason Kuhrt" <jasonkuhrt at me.com> wrote:

> I hear the verdict but not any substantial rationale; why is it
> “confusing”?’
>
> @caridy regarding your examples for JS2016 wouldn’t this
>
>     export default from “foo”;
>
> just re-export one module’s default as another module’s default, right?
>
> In my use-case, in order to map n-number of default-export functions to
> named-export functions I would have to do this ad-infinitum:
>
>     export {default as a} from “./a”
>     export {default as b} from “./b”
>     export {default as c} from “./c”
>     export {default as d} from “./d”
>     export {default as e} from “./e”
>     ...
>
> I’m not saying my syntax for my use-case is amazing, I’m just working
> within the confines of JS. Other languages such as Go have their own
> interesting approaches to modules that we cannot really consider in JS due
> to needing a high level of semantic mapping to legacy CJS Modules.
>
>
>
> On Feb 19, 2015, at 1:31 AM, caridy <caridy at gmail.com> wrote:
>
> Yes, that syntax is incorrect and confusing.
>
> There was an overside from our end to provide a way to re-export only the
> default export from another module, and this is something we plan to
> revisit for ES7/2016. Probably something like this:
>
>      `export default from “foo”;`
>
> this is just sugar for:
>
>      `export {default} from “foo”;`
>
> which is perfectly supported in ES6, including the ability to rename it:
>
>      `export {default as something} from “foo”;`
>
> /caridy
>
> On Feb 18, 2015, at 9:08 PM, Jason Kuhrt <jasonkuhrt at me.com> wrote:
>
> I was prompted to bring this issue to es-discuss.
>
> https://github.com/babel/babel/issues/826
>
> It is my confusion about why this syntax does not work:
>
> export foo from ‘./foo'
>
>
> More details are in the issue but the gist is that sometimes it is
> actually quite handy to export just defaults internally and then re-export
> thing as a “bag” of named exports. This is not currently “easy”. I assume
> this was discussed/considered. I’d be curious what the rationale was.
>
> Thanks!
> Jason
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150219/15c9e133/attachment.html>
d at domenic.me (2015-03-03T21:07:31.026Z)
Why not simply

```js
import a from "a";
import b from "b";

export { a, b };
```