Re:Black, the uncompromising Python code formatter, is stable
by unfunco on Saturday January 29, 2022 @05:04PM
(#30131009)
Rob Pike's proverbs about Go fmt springs to mind: "Go fmt's style is nobody's favourite, but go fmt is everybody's favourite."
[ Parent
| on HN ]
Re:Black, the uncompromising Python code formatter, is stable
by ploxiln on Saturday January 29, 2022 @06:12PM
(#30131571)
gofmt, on the other hand, gives you a lot more flexibility to wrap lines how you deem appropriate. I like gofmt way more than black.
Re:Black, the uncompromising Python code formatter, is stable
by Mawr on Sunday January 30, 2022 @03:42AM
(#30135118)
Exactly, gofmt is actually almost perfect. Ironically, it makes Rob's quote less meaningful.
I think gofmt's brilliance comes down to it not being overly pedantic, it doesn't have an opinion on how all code should be formatted, it only fixes what it sees as clear mistakes.