process.title / process.cwd API is inconsistent #920

sh1mmer opened this Issue Apr 13, 2011 · 8 comments


None yet

7 participants

sh1mmer commented Apr 13, 2011

Why is process.title a property? All other getter/setters in process are methods such as getuid() setuid().

Also process.cwd() and process.chdir() should follow the convention and be process.getcwd() and process.setcwd()

It seems like we should use all methods. It makes sense to me that things like node.version is an immutable property, but that anything that is get/set should be methods.

I'd also be happy if all setter/getter pairs being methods in the format getFoo() setFoo().

ry commented Apr 13, 2011

i agree about process.title. we do not like getters/setters. changing the others, while might be consistent, is unnecessarily disruptive - also i don't like long functions.

sh1mmer commented Apr 13, 2011

I'll do a patch for process.title.

I think we should add synonyms for setcwd() and getcwd() it seems like being consistent isn't so hard. We can always deprecate the old names later. I'll do that as a separate patch to process.title so we can argue about that on it's own :) I don't think those names are that long.

isaacs commented Apr 13, 2011


I'd be ok with getcwd, since that's the posix standard. But changing it should be chdir.

@isaacs isaacs closed this Apr 13, 2011
@isaacs isaacs reopened this Apr 13, 2011
ry commented Apr 13, 2011

@sh1mmer, patch welcome. it must remain backwards compatible


Speaking about consistency, what about process.env then?

Mithgol commented Nov 27, 2011

I guess process.title is consistent against document.title of client-side JavaScript, which is a property.

hackedy commented Apr 18, 2013

revive this for node 1.0?


I don't think anyone really cares at this point. I certainly don't. Closing.

@bnoordhuis bnoordhuis closed this Apr 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment