Module Comments

Kevin Smith khs4473 at
Thu Dec 6 08:54:46 PST 2012

> Note, however, that you still assume some hack in the semantics with
> the "if it exists" part. To avoid that, you need to divorce the import
> syntax from the naming-an-external-module syntax -- which I'd actually
> prefer anyway, and which was the case in the previous version of the
> proposal.

Could we eliminate the hack on the export side instead?

Every module instance has a $DEFAULT export binding.  Normally, it is set
to the module instance itself.  `export = ?` overrides the value of that
binding.  `import x from "y"` binds $DEFAULT in "y" to x.  Maybe?

- Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list