Re:JS Adolescence: Change of opinion regarding certain JavaS...
by fourstar on Tuesday November 13, 2012 @08:24PM
(#4781557)
Aside from inline object literals, and using strict equality (which you should always be using IMO), what does this specifically have to do this Javascript? Everything else applies to general programming.
[ Parent
| on HN ]
Re:JS Adolescence: Change of opinion regarding certain JavaS...
by error54 on Tuesday November 13, 2012 @09:50PM
(#4781785)
Agree. Most of the things would apply to (most) all languages such as avoiding verbose comments and not using 1 word variable names. I fully disagree with his stance on not declaring vars at the top of the scope though. It's a good practice with any JIT compiled language as it's easy to declared the same variable twice if you're not paying attention but it's a very hard mistake to catch as it won't throw error. The reason for strict (read:Crockford) conventions is that Javascript is an incredibly loose language thus it is very easy make mistakes.
Re:JS Adolescence: Change of opinion regarding certain JavaS...
by pyrotechnick on Tuesday November 13, 2012 @09:09PM
(#4781694)
Ubiquity: http://github.com/languages