module.exports = ? is an idiom that a large chunk of Node modules use.
I'll disagree with Dean and opine that this usage is indeed common, but I
have no data to back that up. "module" as a function is also used in the
jquery unit tests.
If it's a "context-sensitive keyword", should these forms work as before?
module(...)
module.someName
In order to have unambiguous syntax it looks like '{' will have to be on
the same line, ala return?
module [no line terminator here] {
The double-use of such an important keyword is unfortunate, but it looks
doable. I think "package" would make a good choice as well, and it's use
in Java doesn't bother me a bit. But then Node dev's use "package" to mean
something different again.
Regardless, I think we need to think carefully about how the Node.js
ecosystem will migrate to ES6 modules. It seems likely that for a certain
period, ES6 Node modules will need to interoperate with pre-ES6 modules.
How will that work?
khs
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en