3 ms·
I hate semicolons too, but I wouldn't recommend removing them in your javascript. Douglas Crockford says to use semicolons, so use semicolons. JS lint is a usef
by railsjedi 16y ago
I hate semicolons too, but I wouldn't recommend removing them in your javascript. Douglas Crockford says to use semicolons, so use semicolons. JS lint is a useful tool and its worth having your code conform to it.
If you really hate the syntax quirks of javascript like me, a better solution is to just preprocess it. CoffeeScript has made me really enjoy writing frontend ui code again. http://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/
- jashkenas 16y agoOne note about this is that CoffeeScript generates JS source that passes JavaScript Lint. You can use `coffee --lint` to verify this, and make sure you get "0 error(s), 0 warning(s)"...
- aaronbrethorst 16y agoSpeaking of, thanks for the introduction to CoffeeScript on Sunday. I think you made a convert out of me. I'm actually kind of enjoying the idea of writing a front end in JS without Sproutcore or Cappuccino solely because of CoffeeScript.
- Marticus 16y agoTrue fact - CoffeeScript did the same for me even though it was heavily frowned upon by others. Typically I omit them if I can. And I have no reason to do so other than I think it makes the code look cleaner (I am often quite zealous on proper indentation / return lines). I figure if using them works for you, rock on. If you hate them and don't use them, rock on. I really don't get bothered by debugging others' code either way as long as it is "readable-formatted" and works. I've found that usually you fall into a situation where you have a company standard and have no choice in the matter though, and it doesn't even make a crap what your personal preference is. Edit: To be fair though I only got "Eagle" on the test, but I chalk that up to only giving the test about 5 minutes of my time, too.