Module syntax

David Herman dherman at mozilla.com
Mon Jun 3 14:38:20 PDT 2013


On Jun 3, 2013, at 10:29 AM, Axel Rauschmayer <axel at rauschma.de> wrote:

> Bikeshedding:

Well, here comes a fun thread...

> Rationale:
> – Reducing the grawlix factor.
> – Making non-default imports more convenient – which I assume will happen more often(?)

That's what this comes down to: do you expect the common case to be small modules with a main export, or large modules with many named exports. We opted for the former, since there are many prominent libraries and communities in the JS world that have gravitated towards small modules. That said, the extra burden of two curly braces is very, very small.

Dave



More information about the es-discuss mailing list