4 ms·
I worked at a shop where there was some Ruby code and autoformatting was argued against from one of the senior tech leads because "[ruby] wasn't designed for an
by leetrout 6y ago
I worked at a shop where there was some Ruby code and autoformatting was argued against from one of the senior tech leads because "[ruby] wasn't designed for an autoformatter. go was built that way"
Absolutely blew my mind. I love go fmt, prettier, black, etc and cannot understand why people still love to argue over styling at this point. I get that he was saying the formatter ships with Go but I don't subscribe to the idea that you can't use an opinionated formatter because the language authors didn't make one.
- recursive 6y agoI can kind of understand it. If it's a first class part of the language, then it's never going to get painted into an ugly corner. As a nearly related example, the LESS css pre-processor language was developed prior to `calc()` expressions. As a result, the LESS language parses arithmetic expressions. So `calc(10em + 10px)` compiles to `calc(20em)`. So in order to do `calc()` expressions, you have to use nasty hacks like `calc(10em ~"+" 10px)`. If LESS "shipped" with CSS, this wouldn't have happened.
- biztos 6y agoI don’t think it’s about being opinionated so much as being configurable. If you can change its behavior then sooner or later you will find someone who insists you do, and then you don’t actually have a standard anymore. I like the authoritarian approach of go fmt and the strong idioms in Golang generally. Maybe because I lost many an hour arguing about the correct way to configure PerlTidy, only to have my hard-won righteous perfectionism destroyed when everyone joined the Cult of Moose.