Inline... On Thursday, December 27, 2012, Martin Cooper wrote:
> > > On Thu, Dec 27, 2012 at 1:06 PM, Rick Waldron > <waldron.r...@gmail.com<javascript:_e({}, 'cvml', 'waldron.r...@gmail.com');> > > wrote: > >> Inline... >> >> >> On Thursday, December 27, 2012, Mark Hahn 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. >> >> >> Completely irrelevant to the discussion... but you have my attention >> now—I'm curious to know what sort of program scenarios you've found >> yourself in where instanceof was the "go to" solution (but painful to use?), >> aside from useful type checking (types as in "object types", not as in >> "data-types"). If you want to know if x has Foo constructor in its >> prototype chain, instanceof has you covered. >> > > Unless you're working with VMs, that is. Then you might not get the > results you expect. For example, this: > > Next time, please read the entire thread before wasting all of our time trying to "correct" another poster, by saying almost exactly the same thing as that poster, ie. me: "Browser or node? In the browser, instanceof fails across frames/global scopes" Despite my being over-specific here, the cross-frame/global scope/context failure still applies anywhere that multiple globals can exist. Rick > > > var vm = require('vm'), > sandbox = {}; > vm.runInNewContext("myDate = new Date()", sandbox); > console.log(sandbox.myDate instanceof Date); > > will output 'false', because Date in the new context is not the same as > Date in the original context. Just one of those little things to be aware > of. > > -- > Martin Cooper > > > > Rick > > > > > > On Thu, Dec 27, 2012 at 11:47 AM, David Habereder > <david.habere...@gmail.com> 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 <david.h...@gmail.com> > >> 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 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?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 nodejs@googlegroups.com > > To unsubscribe from this group, send email to > > nodejs+unsubscr...@googlegroups.com > > 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 nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscribe@go > > -- > 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 > > > -- > 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 > nodejs@googlegroups.com<javascript:_e({}, 'cvml', 'nodejs@googlegroups.com');> > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml', > 'nodejs%2bunsubscr...@googlegroups.com');> > 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 nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en