3 ms·
For some JavaScript devs is it now trendy to refuse best practices? Glad Crockford wouldn't comply. Buggy code is buggy no matter the formatting. Learn to writ
by pestaa 12y ago
For some JavaScript devs is it now trendy to refuse best practices?
Glad Crockford wouldn't comply. Buggy code is buggy no matter the formatting. Learn to write future-proof code (or keep it off GitHub.)
- Shish2k 12y agoIt was trendy two and a half years ago when this thread happened. I like to imagine that things are better now... (They certainly are in Go, where the language authors learned from JS's mistakes, and decided to supply a code formatter alongside the compiler)
- callum85 12y agoThose devs were debating what the best practice is, not refusing best practices. Saying stuff like "Learn to do X properly" in an argument is disingenuous and weak.
- Zikes 12y agoCrockford's argument, though stated abrasively, is that the best practice is the least ambiguous one.
- masukomi 12y agowhy is there a question as to what the best practice is. If you always use a semicolon you have no ambiguity and thus no errors resulting from it. if you don't always use a semicolon you have ambiguity and the resulting compiler errors. Why would you ever not use them other than lazyness?