fs.prototype.readDir = function() { return fs.prototype.readdir.apply(this,
arguments); }... if it nags you that much. It's too late to change it now: it's breaking ABI (although I agree; keep your shit consistent, major pet peeve of mine). Jonathan On Thu, Dec 27, 2012 at 10:33 PM, Isaac Schlueter <[email protected]> wrote: > Mark, > > Yes, there is exactly one require("fs"). > > On Thu, Dec 27, 2012 at 12:17 PM, Mark Hahn <[email protected]> wrote: > > It just occurred to me that I can do fs.readDir = fs.readdir. Will > > this apply to fs in every module? A normal module only has one copy. > > Is there only one instance of fs? > > > > If it does work then I'll make a module that fixes all of these. It > > won't break anything. > > > > On Thu, Dec 27, 2012 at 12:13 PM, Mark Hahn <[email protected]> wrote: > >> Why not also allow readDir? It would cause no harm to do so. > >> > >> This isn't node, but what also bugs me is typeof and instanceof. I > >> cringe every time I type them. > >> > >> > >> On Thu, Dec 27, 2012 at 11:47 AM, David Habereder > >> <[email protected]> wrote: > >>> That clears that up. Thanks. > >>> > >>> Am Donnerstag, 27. Dezember 2012 20:36:30 UTC+1 schrieb Matt Sergeant: > >>>> > >>>> I think you'll likely find where it isn't the case (such as readdir) > the > >>>> name comes from the POSIX function name. There's no readfile function > in > >>>> POSIX, but there is readdir(). The only other case seems to be > readlink, > >>>> which is the same issue. > >>>> > >>>> http://linux.die.net/man/2/readdir > >>>> http://linux.die.net/man/2/readlink > >>>> > >>>> > >>>> On Thu, Dec 27, 2012 at 1:02 PM, David Habereder < > [email protected]> > >>>> wrote: > >>>>> > >>>>> Hi, > >>>>> > >>>>> I am quite new to node.js. > >>>>> > >>>>> As far as I can see the method names aren't very consistent. Take the > >>>>> methods from File System for example: http://nodejs.org/api/fs.html > >>>>> It is ".readFile" (Camelcase) > >>>>> But it is ".readdir" (all lowercase) > >>>>> > >>>>> There are a few more such cases where I don't see a pattern when > >>>>> camelcase is used and when not. > >>>>> > >>>>> You could say that this is absolutely irrelevant and you would be > right. > >>>>> But it annoys me :-( > >>>>> And it reminds me of PHP syntax garbage. > >>>>> > >>>>> Is there any interest in getting all method names either camelcase or > >>>>> lowercase, or will this just stay as is? > >>>>> > >>>>> ~dave > >>>>> > >>>>> -- > >>>>> 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 > >>>> > >>>> > >>> -- > >>> 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 > > > > -- > > 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 > > -- > 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 > -- 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
