News for hackers. Stuff that matters.
Re:Hello World, 1978 by sytelus on Monday January 04, 2016 @06:43PM (#10839726)
One thing that has bothered me is that open brace { for functions starts at new line but for all other statements it starts on same line in K&R style. Why not just be consistent?
Re:Hello World, 1978 by pkolaczk on Tuesday January 05, 2016 @07:06AM (#10842780)
Because for some people it looks better that way. For simple statements, I often find placing braces on their own lines introduces too much of free space. With a few things nested it often looks as if there were more braces than the code itself. And also, I like to group some statements together (by not having free space between them) and suddenly having to separate them by a free-standing brace breaks it. Of course all of this is just a matter of taste.