I don't want to say all linting is useless. JS(L/H)int sure as hell is though.
JSLint is completely based on subjective experience over fact. What was crockford's explanation of why he doesn't allow case fall-through? "One time my case fell-through *unintentionally* and bad things happened, so now I think falling through *intentionally* is bad.* Did you spot the nonsequitur? > It's particularly easy to introduce when pasting comma-last code into > comma-first. Sounds like an opinion based on something you...experienced once. Anyway, maybe you should try to avoid copy-and-paste coding. It's been widely considered a flawed way to program for a while. Or should everyone be required to switch to comma-last style just so you can copy and paste their code easier? That's what you're arguing against isn't it? That comma-first is bad, and the reason for it is: comma- last people have trouble copying and pasting comma-first code, so you should switch to cater to the comma-last people. On Feb 24, 12:39 pm, Dean Landolt <[email protected]> wrote: > On Fri, Feb 24, 2012 at 1:12 PM, Christopher Jeffrey > <[email protected]>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 [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
