Module syntax

Rick Waldron waldron.rick at gmail.com
Mon Jun 3 13:02:48 PDT 2013


On Mon, Jun 3, 2013 at 3:57 PM, Domenic Denicola <
domenic at domenicdenicola.com> wrote:

> I really dislike `export =`. It looks like it should be creating a global
> variable named `export`.
>
> `export default` is perfect IMO. It also conceptually fits better with how
> default exports work. (I.e., they're *default* exports, they're not the
> entirety of the exports. They don't overwrite the module instance object,
> in the fashion that `module.exports =` does.)
>


Agreed. I was drafting a response when this came through and it expresses
everything I was already writing.

Anything that "looks like an assignment", but isn't, is subjectively a
really bad idea.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130603/bd6dc9f4/attachment.html>


More information about the es-discuss mailing list