News for hackers. Stuff that matters.
Re:Actual drawbacks to omitting semi-colons? by railsjedi on Wednesday October 06, 2010 @12:13AM (#1762677)
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/

Re:Actual drawbacks to omitting semi-colons? by Marticus on Wednesday October 06, 2010 @12:55AM (#1762783)
True 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.

Re:Actual drawbacks to omitting semi-colons? by jashkenas on Wednesday October 06, 2010 @12:23AM (#1762700)
One 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)"...
Re:Actual drawbacks to omitting semi-colons? by aaronbrethorst on Wednesday October 06, 2010 @12:28AM (#1762710)
Speaking 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.