Re:Indentation Style: Notable Styles
by voidUpdate on Wednesday February 26, 2025 @04:40AM
(#43182234)
I often put an extra line of space after blocks, and between lines that are less logically linked, just to separate them in my head better. Also I do wish you could use brackets in Python so I could have my beloved Allman there too :P
[ Parent
| on HN ]
Re:Indentation Style: Notable Styles
by danwills on Wednesday February 26, 2025 @04:56AM
(#43182322)
Same!
To me it's a bit like formatting any document nicely.. we wouldn't usually let paragraphs run into each other, and I think in general it can be helpful to split up long blocks of anything into concept-sized chunks whenever possible for easier reading! (I think of this as a type of weird antialiasing)
Re:Indentation Style: Notable Styles
by voidUpdate on Wednesday February 26, 2025 @05:45AM
(#43182568)
Makes sense to me. The annoying thing with Go is that every end of line that doesn't have a brace gets a sort of virtual semicolon added, to make it easier for the programmer, so Allman style is forbidden, since it would mean that the previous line gets a semicolon appended. I guess that also means you can't split statements across multiple lines like you can in other languages for readability :/