douglascrockford/JSLint:
The place to express yourself in programming is in the quality of your ideas, and the efficiency of execution. The role of style is the same as in literature. A great writer doesn't express himself by putting the spaces before his commas instead of after, or by putting extra spaces inside his parentheses. A great writer will slavishly conform to some rules of style, and that in no way constrains his power to express himself creatively. See for example William Strunk's The Elements of Style [http://www.crockford.com/wrrrld/style.html].
 

E. E. Cummings might disagree.


Look, I've written about JSLint's Crockford before.  He's a little off his rocker.  It's perhaps a productive neurosis, but it's something of a [non-clinical, popular connotation only] neurosis nonetheless.

The important thing here is that there are not persistent rules of grammar, in writing or coding.  Strunk & White didn't decide what was a best practice when they wrote of grammar and style.  They tried to capture current convention.  Language doesn't sit, sessile.  It's morphs.  Nobody says, "Verbing weirds language," until they do.

Maybe he's against illegal opcodes too?  Well, that'd be stupid.  Why not do what the machine lets you, if there's an advantage?  Let your peers decide if what you've written is better, and the circle of peers is lots larger than just Crockford. We don't all evolve lockstep with someone's plan. That's the whole point of a passive selective system.

The worst part is the take it or leave it mentality JSLint has.  Found an error?  Sometimes, apparently, it just stops.  I'm sure there's a setting somewhere, but a coworker has experienced it stopping on (var i; i < intLimit; i++). Stopping. No additional information. Change where the i is declared or I'm taking my toys and going home. If you don't fix each error, I'm not letting you know where all of them are, regardless of if the code works or not.

That's wack, man. Bring back the poetry. Or at least the chance for all us primates slapping at keyboards to accidentally make some.

EDIT: This, from the Criticism section of Elements of Style's entry on Wikipedia, has some interesting info...

In criticizing The Elements of Style, Geoffrey Pullum, professor of linguistics at Edinburgh University, and co-author of The Cambridge Grammar of the English Language (2002), said that:

The book's toxic mix of purism, atavism, and personal eccentricity is not underpinned by a proper grounding in English grammar. It is often so misguided that the authors appear not to notice their own egregious flouting of its own rules . . . It's sad. Several generations of college students learned their grammar from the uninformed bossiness of Strunk and White, and the result is a nation of educated people who know they feel vaguely anxious and insecure whenever they write however or than me or was or which, but can't tell you why.[10]


Yeah, see, that's not the paradigm we're looking for. [sic]

Labels: , , ,