Re: Module naming: underscore vs. dash

817 views
Skip to first unread message
Message has been deleted

mscdex

unread,
May 13, 2011, 12:41:46 PM5/13/11
to nodejs
On May 13, 8:34 am, Alice <dofflt...@gmail.com> wrote:
> Most of the node.js modules use dash in the module name (Seehttps://github.com/joyent/node/wiki/modules). But now that node.js
> introduced new 'child_process' module should we switch to the new
> underscore convention?

"New?" The child_process module has been there for quite some time.

Isaac Schlueter

unread,
May 13, 2011, 2:56:46 PM5/13/11
to nod...@googlegroups.com
Node's built-in modules with multi-word names use underscores for
reasons of implementation details. (They're converted to C-variable
names, so - is not valid, but _ is.)

The convention in node userland is to use "-" to separate words in
filenames, and thus in module names.

> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages