samth at ccs.neu.edu
Thu Dec 6 04:21:35 PST 2012
On Thu, Dec 6, 2012 at 1:25 AM, David Herman <dherman at mozilla.com> wrote:
> On Dec 5, 2012, at 7:16 PM, Kevin Smith <khs4473 at gmail.com> wrote:
>> 2) Do we need `export *;`?
>> I don't see the point of exporting every declaration in the current module scope. If the programmer wants to export a bunch of stuff, the other forms make that sufficiently easy. Exporting everything encourages bad (de-modular) design.
> Again, reasonable point.
I *strongly* disagree. There are two important use cases for `export
*` -- exporting everything you've defined, for little convenience
modules or other quick tasks, and for wrapper modules where you want
to export everything you import from somewhere else. Not having it
means that you have to write everything explicitly, but more than that
means that you end up with annoying busy work when you forget, and
have to go figure out where the missing import or export is. I don't
see any benefit to leaving it out (unlike `import *`, which was
genuinely complex), and I don't think we need to tell programmers what
good design is.
More information about the es-discuss