Finally, someone understands that Allman is not that great, and that Kernighan & Ritchie is the way to go.
Also, Haskell, my guy, you good?
Lisp, are you ok? Do I need to call your parents?
idk, Allman is very readable. Easy to scan vertically to find the matching open brace. Not quite as vertically-space efficient as the best way, but it's not offensive.
Noone writes Haskell like that. People generate Haskell like that because layout syntax is a fickle beast to generate and outputting braces means you can make mistakes in layout without breaking things, the way the braces and semicolons are output emphasise how they actually don't matter, they're also easy to delete in a text editor.
Also it matches up with other Haskellisms, e.g. lists:
let foo = [ bar
, baz
, quux
]
See how it's immediately apparent that you didn't miss a single comma? It's also trivial to match up opening and closing brackets like that, even in deeply nested situations.
Not doing that is actually my main pet peeve with Rust's standard formatting.
Allman or even horstmann I could still deal with, the rest would be difficult.
Though none are as bad as whoever came up with right aligning all the brackets to make any code look like python until you spot the deranged line of brackets on the right…
I cannot for the life of me find it now but the dude put it on GitHub
Allmans what I learnt then went to K&R on my own because it made more sense to me. I think GNU is fine I guess, not the others though. Not that what I say matters I've forgotten how to code and can barely do Hello World these days.
On a serious note tho, I never understood the benefits of GNU's spaces after functions. I don't really mind most of the rest but I just don't get the benefits of 'funcname (arg)' vs. 'funcname(arg)'. Is there a specific reason for this? Personally, I find this to reduce readability because I have to think for a split second whether I'm looking at a variable or a function call.
Of cause this is also due to my habits, but I'm curious as to what the reasoning is.