5 ms·
Both this and the parent (and even the OP, controlling for Cringely) give a fascinating perspective on Google's culture of peer review. Just out of curiosity, c
by gruseom 17y ago
Both this and the parent (and even the OP, controlling for Cringely) give a fascinating perspective on Google's culture of peer review. Just out of curiosity, can you give some examples of how coding standards developed for C++ and Java wouldn't translate well to JS? (I'm a little surprised to hear about an anti-JS bias there, actually, though it does explain GWT.)
- curtis 17y agoA classic case I can think of involved a JavaScript class (or "class" for the purists out there) that was just used for data interchange. Basically it was just a collection of properties. However, for each property "foo", there was a trivial accessor method called "getFoo()". And because the coding standards said that everything must be JsDoc'd (JavaDoc for JavaScript, basically), the property initialization in the constructor had a JsDoc comment, something to the effect of "This is the Foo.". Then the accessor function, getFoo() had a JsDoc comment to the effect "Gets the Foo". Now in all fairness, the JsDoc comments were used to pass type annotations to the JavaScript compiler/compressor/obfuscator. But still, what the hell is the point of not just writing useless comments, but writing them twice? Not to mention the fact that accessor functions aren't all that useful in JavaScript, and they're especially not useful for objects that are just a big bag of properties.
- neilk 17y agoWell, to be fair to GWT -- I know the guys who developed GWT, and they are really smart people who just didn't like having the client/server language distinction, and who believed that type-unsafe languages suck for programming, and who wanted to use Java IDE tools to debug client-side issues, etc. etc. They were and are very smart JS developers, for obvious reasons -- they write the infrastructure that supports GWT in raw JS, at least initially. However, internally, at least at my project, they liked GWT because they thought it would liberate them from Javascript. Slightly different focus there.
- nradov 17y agoHere is the most commonly accepted coding standard for JavaScript. http://javascript.crockford.com/code.html http://javascript.crockford.com/code.html If you're familiar with C++ and Java coding standards you can see the JS one is substantially different.