3 ms·
But why? Why drop the semicolons? What is the benefit? If the net result is exactly the same, why try and be tricky? What is the point, other than you can do
by dos1 15y ago
But why? Why drop the semicolons? What is the benefit? If the net result is exactly the same, why try and be tricky? What is the point, other than you can do it. But there are many tricky things we can do with programming languages, but very few we should
- true_religion 15y agoHe never said the net result was the same. He said that there were no problems. No problems doesn't imply no benefits.
- viscanti 15y agoOn a team of a sufficient size, dropping semicolons hurts. Someone will be running a static analysis "lint" program in their editor, and it will always flag those missing semicolons. That certainly adds additional cognitive friction to those users, who constantly see the reminder to add the missing semicolon. I guess I've never understood the argument for omitting them. It seems like an unnecessary trick. Coding guidelines should enforce the simplest possible patterns and techniques.
- secoif 15y agoUnlikely the default lint options are going to suit all teams anyway. JSLint/JSHint can, and should be configured for your team's style.
- secoif 15y agoThe point is to reduce noise. JavaScript already has a lot of cruft going on with all its anonymous functions, parens and curlies… anything to reduce the signal to noise ratio is a step in the right direction.
- lucisferre 15y agoIf you really cared about that you would use coffee script. Dropping semicolons is such a triviality.
- secoif 15y agoI do use coffeescript on appropriate projects.