Single import from modules without default export

Kevin Smith zenparsing at gmail.com
Mon Aug 11 05:59:25 PDT 2014


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140811/b283681f/attachment-0001.html>


More information about the es-discuss mailing list