Under this hypothetical scenario, I would also remove the ability to export
bindings with reserved-word names, since the only supporting use case is
default exports.  The grammar would then be:

    ImportDeclaration:
        import ModuleSpecifier ;
        import ImportList FromClause ;

    ImportSpecifier:
        ImportedBinding
        Identifier as ImportedBinding
        * as ImportedBinding

    ExportDeclaration:
        export * FromClause ;
        export ExportList FromClause ;
        export ExportList ;
        export VariableStatement
        export Declaration

    // ImportClause removed
    // NamedImports removed
    // ExportClause removed

JS currently gets a lot of flak for its reliance on curly braces, and in
this case we don't need them.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to