Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do that because I write a lot of JavaScript and semicolon insertion will mess you up if you don't make a habit of putting the opening brace on the end of the line. I suppose I could have two different styles but that sounds like an even worse option.


Exactly -- for JS sytle see Crockford, who explains these in detail: http://javascript.crockford.com/code.html


I've wrote a lot of Javascript, and have yet to get bitten by semicolon insertion. It's been a year or so since I really hacked JS, so I loaded up about 200K of code I've written and it's all braces-stand-alone.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: