ModuleImport

Ron Buckton rbuckton at chronicles.org
Tue Jun 24 18:07:05 PDT 2014


If it is considered legal, then I'd say maybe the default export should be named @@default (or a similar symbol) instead.

Ron

Sent from my Windows Phone
________________________________
From: Calvin Metcalf<mailto:calvin.metcalf at gmail.com>
Sent: ‎6/‎24/‎2014 5:47 PM
To: Kevin Smith<mailto:zenparsing at gmail.com>
Cc: EcmaScript<mailto:es-discuss at mozilla.org>
Subject: Re: ModuleImport


Side note: is that legal?  I assumed you wouldn't be able to do that due to default being a reserved word.

On Jun 24, 2014 7:53 PM, "Kevin Smith" <zenparsing at gmail.com<mailto:zenparsing at gmail.com>> wrote:


I don't agree that the changes to the semantics are large, if we're talking about simply allowing a single syntactic form for both named and default import and Ron's option (A) (where default and named exports can not co-exist... until ES7 at least).

But unless you want to rewrite the design, you cannot prevent a default export and named exports from co-existing:

    function F() { }
    export { F as default };  // Named and default



_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org<mailto: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/20140625/6acd4308/attachment.html>


More information about the es-discuss mailing list