Re:Google JavaScript style guidelines
by andreyf on Saturday July 17, 2010 @04:59PM
(#1524627)
I wonder what an IDE that enforces all of these guidelines would be like?
[ Parent
| on HN ]
While it doesn't enforce the guidelines, their Closure Compiler enforces the variable types and encapsulations declared in the JSDoc comments with warnings.
http://code.google.com/closure/compiler/
On another note, a Google engineer argues against Crockford's arguments for functional inheritance while pitching the benefits of the Closure Compiler and Library: http://www.bolinfest.com/javascript/inheritance.php I find his points are well made.
Also check out Bolin's "Closure: The definitive guide" book, available as a rough cut. A great book indeed.
If guidelines were meant to be enforced, they'd be syntax.
not necessarily ... official language standards bodies might make decisions much more slowly than individual hackers or groups, and even when a feature is officially baked into a new version of the syntax, it might take compilers/interpreters several more years to all implement them properly. there's definitely a need for good lightweight static checking of guidelines in IDEs
No, because guidelines can be overridden when there's a good case for doing so. Not so with syntax.
Agreed. "Style is only necessary where understanding is lacking." - Doug Hoyte
Re:Google JavaScript style guidelines
by kwamenum86 on Saturday July 17, 2010 @05:29PM
(#1524681)
well said