4 ms·
>> ...there is no debate... > ...And so many languages have an opinionated formatter these days The crux of gp's post is for Go, there is no debate as 'go fmt
by overfeed 1mo ago
>> ...there is no debate...
> ...And so many languages have an opinionated formatter these days
The crux of gp's post is for Go, there is no debate as 'go fmt' is the only one that matters. Black is great, but some people prefer Ruff, leading to ...debates about which formatter the team/org should use. Go's batteries-included philosophy makes those discussions moot on so many levels beyond formatting.
- ciupicri 1mo agoAs if projects haven't used to have a coding style. What's so hard in saying that code should be formatted with Black, yapf, ruff etc, beats me.
- badrequest 1mo agoLiterally within this thread someone has already suggested using ruff instead of Black and nobody here are colleagues.
- the_sleaze_ 1mo agoIt's a silly argument and the lowest form of bike-shedding on the level of tabs vs commas. People with no other substantive contributions use formatting as a beard. The first one to choose it (whatever it happens to be) wins and that's the end of it. If it isn't the end of it you've got a talent issue.
- overfeed 1mo ago> It's a silly argument and the lowest form of bike-shedding on the level of tabs vs commas Guess what other low-level bike-shedding argument 'go fmt' obviates? That's right - tabs vs spaces! > If it isn't the end of it you've got a talent issue. I know you meant this as a slur, but the implication is Go works better than other languages for those who have what you call "a talent issue"
- Cthulhu_ 1mo ago> Go works better than other languages for those who have what you call "a talent issue" This is actually true and by design; a bit more nuanced from [0]: "Programmers working at Google are early in their careers and are most familiar with procedural languages, particularly from the C family. The need to get programmers productive quickly in a new language means that the language cannot be too radical." Talent is important, but doesn't scale. You can have the best of the best software developers but it's a moot point how talented they are at industrial scales (hundreds of applications, tens of millions of LOC, thousands of developers, tens of thousands of features, decades of work, etc) Note that "early in their careers" from the perspective of the author is basically <20 years of experience. [0] https://go.dev/talks/2012/splash.article https://go.dev/talks/2012/splash.article
- trimethylpurine 1mo agoDo you feel that this could equally apply to a Rust vs Go argument?
- the_sleaze_ 1mo agoI do. Bike sheds do need to be painted after all, but its many less people who have the technical experience to know how many feet away from the property line it must be.
- trimethylpurine 1mo agoI had to think about that analogy for a moment. It's great. I wonder if that's how people feel when I use them and get a puzzled look.
- Cthulhu_ 1mo agoIt's not hard, but when you go from project A to B you'll have to check which formatter is used; this is additional setup / overhead, plus context switch. With Go, there is no additional setup / overhead / context switching, all Go code is formatted the same way with the same tools. This is important when dealing with large code bases and many projects, it lowers the barrier to entry by a lot. A common anecdote from Go developers is how easy it is to drop into a random codebase and just be able to read/comprehend it and work in it right away, and the ecosystem-global code style is an important aspect of that.
- maleldil 1mo agoBad example. Ruff's formatter has the same style as Black. It's documented as a "drop-in replacement". The difference is mostly performance. In any case, that's a single decision the project lead takes once.