Hilarious "exchange", though that's being kind, on github regarding JSLint. I could copy and paste, but it's required reading in the original. I'll highlight two bits with images for you "TL:DR or click"-ers.



So kittteh sayz "Can I politely ask for cheezeburger".

... I get an additional error stating Unexpected space before '['.

The only way to get rid of this error is to format the script like this, which I think make it more unreadable:

var showOrHide = 'show';
jQuery('.selector')
.removeAttr('style')[showOrHide]();
So my question is would it be possible to make the second example not produce an error?

Thanks :)


Mr. Crockford responds: NO WAY KITTEH!!!


When this happens to me, I get a little flush. What thah...? I mean, engage the asker, right? Why the draconian SLAM? He's not asking if it's, in your royal opinion, The Right Thing to do. He's asking, nicely, if you wouldn't mind him doing This Wrong Thing briefly. They're asking nicely, likely represent a problem experienced by more users than themselves, and you what? NO KITTEH, THAT'S MY POT PIE! I mean, it's fair game to say, "I get your meaning, but, at least subjectively, I'd like to encourage different behavior." Macro it. It's nicer.

Thank you to Cartmans around the world for your pleasant conversation, even if you're right. ;^)

Labels: ,