ModuleImport

Kevin Smith zenparsing at gmail.com
Sat Jun 28 09:03:58 PDT 2014


>
>
> This would give the same power / flexibility as CommonJS and a simple
> compatibility path. This would eliminate the "default" exports problem
> because it would allow a module to export a function. It is also easy to
> explain.
>

So this is basically the "sugar over CommonJS modules" solution.  But why
bother?  "require" already does all of this and there already exist tools
to generate dependency graphs from "require".  No syntax is required.


>
> Static checking on exported members feels odd.
>

Static checking of imports and exports has well-known advantages and would
help the long-term viability of the language.  Segments that want static
checking to be a part of their workflow might very well just leave JS for
some other language that provides it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140628/c943d4d3/attachment.html>


More information about the es-discuss mailing list