News for hackers. Stuff that matters.
Re:Things Rust shipped without by Animats on Friday July 03, 2015 @03:56PM (#9827614)
Please don't make it an option. Use one format to rule them all, as with "gofmt". I don't care what it is, but pick something and standardize.
Re:Things Rust shipped without by tatterdemalion on Friday July 03, 2015 @05:34PM (#9828084)
I'm not working on rustfmt but my understanding is that its output is going to be configurable.

Every language carries with it a culture. The culture of Go is one which allows for gofmt to define one true style and refuse to deviate, just as it allows the language designers to refrain from adding generics.

The culture of Rust is not like that, for several reasons. For one, the Rust community loves a good bikeshed. For two, the syntax of Rust is more complicated than Go, and includes situations (match statements & where clauses come to mind) in which people are just going to want to different things.

I know the advantages of one true style - everyone's heard the arguments - and there's a sane, median default as the official style guide, which will be rustfmt's default output. That seems like a good compromise.

Re:Things Rust shipped without by madez on Friday July 03, 2015 @04:17PM (#9827712)
It seems you are misunderstanding the situation because you are talking about not making “it” an option and you are then reiterating what I also said.

Even if I repeat myself: I think there should be one default formatting that is standardized and there should be the option to emit in other formats such that everyone can read in the individually preferred format.

With fmt you don't need to establish formatting rules on a project basis, anymore. Everybody can just configure their editor to format the code how they want it to look. That is why I think rustfmt should be compilable as a library, too.