> Good observation. However, if I were to simplify, I’d only keep #3. #1 and
> #2 look more syntactically questionable to me (kind of abusing names as
> keywords/markers).
>

#1 is the base case because it is completely general.  Any IdentifierName
may appear in the "as" clause.

    export { x as delete, y as new, z as default }; // Perfectly fine!

Of course, "default" has special meaning on the import side:

    import x from "package:foo";

Desugars (very beautifully) to:

    import { default as x } from "package:foo";

The sugaring on the import side is a clear win, but I'm not so sure about
the sugarings on the export side.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to