Agreed 100%! I haven't written in go yet but whenever there are brackets I like for them to be vertically aligned with each other like Allman (even in Python!).
Agreeing with sibling comment too that K&R can be ok.. seems like K&R function declarations have Allman-like vertically-aligned brackets, but why not make that consistent for blocks inside the function too? 1TBS goes in the opposite direction, so not heaps of a fan of that.
I am a big fan of whitespace in code though, running afoul of various style-guides at times (like PEP8) because of the desire to put space between things to make things clearer.
I reckon code is already a very-condensed form of information, so it can help to make it easier to distinguish the meaningfully-different pieces by having some space around them. I know this is not everyone's jam, but that's what I like when reading code.
Same, but for GNU. I can't speak for Go, as I hate Google with a dying passion, but the Rust toolchain not supporting GNU style is a tiny part of why I don't like the language (well, I do like it conceptually, but I wouldn't want to use it for anything).
Whitesmiths, if I remember correctly was used in Symbian C++. I remember I found it quite odd (as most things in Symbian) when I started using it. But, it grew on me and I actually thought it improved the readability.
voidUpdate|1 year ago
danwills|1 year ago
Agreeing with sibling comment too that K&R can be ok.. seems like K&R function declarations have Allman-like vertically-aligned brackets, but why not make that consistent for blocks inside the function too? 1TBS goes in the opposite direction, so not heaps of a fan of that.
I am a big fan of whitespace in code though, running afoul of various style-guides at times (like PEP8) because of the desire to put space between things to make things clearer.
I reckon code is already a very-condensed form of information, so it can help to make it easier to distinguish the meaningfully-different pieces by having some space around them. I know this is not everyone's jam, but that's what I like when reading code.
bakuninsbart|1 year ago
volemo|1 year ago
weinzierl|1 year ago
If only it had begin and end instead of the ugly braces we'd be in a wonderful world.
tmtvl|1 year ago
unknown|1 year ago
[deleted]
monegator|1 year ago
[deleted]
rob74|1 year ago
floren|1 year ago
eliasson|1 year ago