Jason Kuhrt (2015-02-20T00:50:02.000Z)
Hey Matthew,

This is another pattern I could take yup.

Kevin pointed that if I suck it up and move all my modules toward named-exports then my problems go away too. The reason I am using default internally was that I had modules depending on others which are all uniformly single-function modules (react components to be specific). So it felt confusing to have this syntax internally:

    import { foo } from ‘../foo’

When what I’m really trying to express is:

    import foo from ‘../foo’

But ultimately if I am willing to accept that internally I use the former syntax then my re-export expressions are fine:

    export * from ‘./foo'

These are small details but added up they matter. Generally I’m happy with modules though. The only other gripe I have is not being able to import each export naked into a namespace like this:

import * from ‘./foo’

Haskell etc. allow this (actually its a bit richer/better but yeah, basically). Often namespacing is what you want, not always.

Jason


> On Feb 19, 2015, at 12:29 PM, Matthew Robb <matthewwrobb at gmail.com> wrote:
> 
> ​Just curious if this meets the use cases being discussed here, @caridy @jason ?
> ​
> 
> On Thu, Feb 19, 2015 at 9:22 AM, Matthew Robb <matthewwrobb at gmail.com <mailto:matthewwrobb at gmail.com>> wrote:
> import a from "a";
> import b from "b";
> 
> export { a, b };
> 
> 
> 
> 
> 
> - Matthew Robb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150219/f3b44a06/attachment.html>
d at domenic.me (2015-03-03T21:07:47.885Z)
This is another pattern I could take yup.

Kevin pointed that if I suck it up and move all my modules toward named-exports then my problems go away too. The reason I am using default internally was that I had modules depending on others which are all uniformly single-function modules (react components to be specific). So it felt confusing to have this syntax internally:

    import { foo } from ‘../foo’

When what I’m really trying to express is:

    import foo from ‘../foo’

But ultimately if I am willing to accept that internally I use the former syntax then my re-export expressions are fine:

    export * from ‘./foo'

These are small details but added up they matter. Generally I’m happy with modules though. The only other gripe I have is not being able to import each export naked into a namespace like this:

import * from ‘./foo’

Haskell etc. allow this (actually its a bit richer/better but yeah, basically). Often namespacing is what you want, not always.