The social value of rustfmt and the default Rust style is absolutely incredible. I saw someone the other day talking about the annoyance of having people reformat other people's code in a PR and do so differently/inconsistently. And I had this reaction of "...oh, yeah, that used to be a thing that came up". Huge appreciation for the #rustlang rustfmt team for all their work.
=> More informations about this toot | More toots from josh@joshtriplett.org
Relatedly, I love that rustfmt can stack opening/closing constructs like this:
field,
otherfield: value,
}))
=> More informations about this toot | More toots from josh@joshtriplett.org
@josh Having a premade answer for a bunch of usually uninteresting questions is such an advantage. When C++ devs tell me "C++ also has $thing," that doesn't address the fact that C++ also has 10 other competing solutions and everyone wants to use their favourite.
=> More informations about this toot | More toots from pkhuong@discuss.systems
@pkhuong @josh And even the dominant solution in this specific example, clang-format, is by design a Swiss Army knife so it doesn't solve the problem of every project having its own set of conventions.
=> More informations about this toot | More toots from pervognsen@mastodon.social
@pervognsen @pkhuong @josh Each project having their own conventions is actually fine to a point. Rust allows this to, there are a huge number of things rustfmt
twiddle too. The issue is not projects having their own preferences, the important thing is that the format tooling has deterministic output and is nearly universally deployed everywhere the compiler and/or editors are.
=> More informations about this toot | More toots from alerque@mastodon.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini