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.
[ Parent
| on HN ]
There are no comments on this comment yet.