On Fri, Feb 24, 2012 at 1:12 PM, Christopher Jeffrey <chjjeff...@gmail.com>wrote:
> This also seems to tie in with the notion that `new` is dangerous. A > little while ago, I actually did forget the `new` on a constructor. It > took me about a minute flat to track the error down. Yeah, a hole in > the array will probably break your code, but that's what you want it > to do. > > How silently will it break your code? For the `new` operator, I don't > think it's silent at all. It won't take more than a couple lines or > calls before something throws, because the global object is *not* your > object. A hole in the array: I have no idea, because I've never even > seen it myself. I've never tracked an error down that lead me to a > hole in an array literal. All of these linter things are just made-up > problems based on syntactic obscurities and eccentricities. If they > occurred in reality, they're actually probably more noticeable than > they seem on paper. > I see you're less interested in objective fact and more interested in personal anecdotes. Wave your hands and pretend it's "made up" all you want but this particular problem has happened to me. It's particularly easy to introduce when pasting comma-last code into comma-first. And it's particularly insidious because you get an otherwise perfectly normal array that might only break in some very rare branches. Insisting linting is useless is selling snake-oil. -- 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