News for hackers. Stuff that matters.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by saagarjha on Saturday June 15, 2019 @08:14PM (#20193016)
Of course, you can omit the braces if there’s a single statement (though I personally never do this).
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by gpm on Saturday June 15, 2019 @08:19PM (#20193032)
Sure, and you can put the else on the same line as the end of the if block even without doing that. Or you could make the difference bigger by putting the opening brace on a newline.

I wrote the style of C that I actually write, but it's probably not fair for me to label it as a property of just the language.

Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by saagarjha on Saturday June 15, 2019 @08:21PM (#20193042)
I think it’s a fair point to bring up given that many people actually do write their code that way.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by gpm on Saturday June 15, 2019 @08:29PM (#20193072)
I agree, I hope I didn't come across otherwise, just wanted to clarify why I wrote it like that.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by masklinn on Sunday June 16, 2019 @04:20AM (#20194454)
Or even use allman / gnu where opening braces are also on their own line.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by saagarjha on Sunday June 16, 2019 @04:26AM (#20194470)
Yes, but those people clearly have issues ;)