On Wed, Jun 25, 2014 at 4:50 PM, C. Scott Ananian <ecmascr...@cscott.net> wrote:
> @John Barton: Yes, ideally that syntax would work as well when you don't > need a namespace. But sometimes you do need a namespace, even if you don't > care precisely what it is: > ``` > import {format} from 'url'; > import {format} from 'util'; > import {connect} from 'tls'; > import {connect} from 'net'; > import {fork} from 'cluster'; > import {fork} from 'child_process'; > // etc > ``` > I agree, and importing as a namespace is what ModuleImport is all about. Crazy idea: what if we had this: // ModuleImport: import Identifier from StringLiteral import fs from "fs"; import url from "url"; And just got rid of the default monkey-business? Simple, no confusion, no refactoring hazards. Do we *really* need assignable default exports? If we could jettison that feature, it would (as John points out) make all of this pain go away.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss