Comment by swiftcoder
2 days ago
The major reason auto-formatting became so dominant is source control. You haven't been through hell till you hit whitespace conflicts in a couple of hundred source files during a merge...
2 days ago
The major reason auto-formatting became so dominant is source control. You haven't been through hell till you hit whitespace conflicts in a couple of hundred source files during a merge...
First time I saw this hell was when a junior colleague convinced a rather senior one to use black. Of course senior went bumbling around black-ing every file he touched, including some random thousand-line files in long-lived forks of an established code base. Those files became essentially unmergable from then on.
It was a confluence of a lot of bad design features and blunders and I can't blame the formatter for the mess it caused. So I understand your point but, I'd amend it a bit: version control is the reason many projects require a specific formatting style.
In projects without an explicit style, the number one formatting rule is don't reformat code you didn't touch.