News for hackers. Stuff that matters.
Re:Avoid Else, Return Early (2013) by DanHulton on Monday March 26, 2018 @11:31AM (#16679615)
I've actually evolved a hybrid style in my personal projects - next line for functions/classes, same line for blocks.

To me, it looks weird when functions don't have that extra line of space to set off their definition, but if/while/whatever aren't special enough to need that call out.

That said, the most important factor is simple consistency. In my person projects, I have the hybrid style. At work, I use same-line-only. If I'm on a project that has next-line, we all use next-line.

Re:Avoid Else, Return Early (2013) by nitrogen on Monday March 26, 2018 @01:10PM (#16680510)
I think the Linux kernel style is similar. That was the first coding standard I somewhat adopted, but naturally have adapted to many others on different teams over time.
Re:Avoid Else, Return Early (2013) by erik_seaberg on Monday March 26, 2018 @02:03PM (#16681011)
I think this style dates back to K&R C where you (maybe) declared argument types after the parens.

  int max(a, b) 
  double a, b;
  {
      return a > b ? a : b;
  }