|
|
|
|
|
by kibwen
3045 days ago
|
|
I don't agree. There is a default configuration, and that configuration is very good (I've been following the process of nailing it down, and IMO it's been done very tastefully), and is the formatting used by official Rust codebases, lending it the weight of authority. I have no reason to configure it to do anything differently. But I also have no reason to forbid anyone else from formatting code as they please. What's the possible harm? If you're on a team, and you want code uniformity, you require the default configuration. If you're worried about pulling some random code and having it use {tabs|spaces} instead of {spaces|tabs} (which, btw, is, without hyperbole, the dumbest argument in the entire human history of programming) then you set your editor to run rustfmt on files before opening them. The gofmt argument isn't the final word here. There's plenty of Go users who don't like gofmt's style, so they just don't use gofmt. It's easy to imagine other users who don't like gofmt's style, and don't like being pressured to use it, so they just don't use Go at all. How is that any better than just having a configurable tool with sane defaults? It's one thing for a tool to be opinionated; it's another thing entirely to be dictatorial and stubbornly inflexible. |
|
Obviously the proliferation of coding formatting styles. It's not we didn't have "official styles" and formatting tools before for other languages.
The greatness of gofmt, and what people love it for, is how it killed all other options.