Hacker News new | comments | show | ask | jobs | submit login

I am currently writing the a style guide (for a small agency), and I have added semi-colons as preferred for JavaScript. And abusing the && operator like in the now infamous code snippet is definitely out.

Our code needs to be maintainable for inexperienced developers. I don't want to make it easier for them to make mistakes and I don't want them to ponder rare (though valid) syntax. I feel this is a valid reason to maintain this rule.

  // This we can all understand
  if(isActive) {
Once a developer understands ASI and other details he is free to feel elated with his new-found knowledge, but I'd prefer if he choses to know rather than to apply these powers.

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