Re:Software Engineering at Google (2020) [pdf]
by 4ad on Wednesday May 04, 2022 @07:07AM
(#31258875)
> When splitting a function/method definition over multiple lines, I like to align the parameters.
Please don't do this. It's horrible for us who use proportional fonts.
In fact I would go as far as arguing that "artificial" line breaks are always bad. They aren't really more readable, quite the opposite usually, and most importantly they break diff.
I like short lines, and it's a good ideal to strive for. 98.5% of my code fits in 80 columns, but if I need a longer line, don't artificially make it worse in the pursue of some arbitrary rule.
If we have contextual limits, we can make method headers arbitrarily long while keeping the body within a tight limit. Or allow a longer line when defining a lambda in python as another comment laments.