Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advocacy document motivating automatic formatting #54

Closed
nrc opened this issue Jan 23, 2017 · 4 comments
Closed

Advocacy document motivating automatic formatting #54

nrc opened this issue Jan 23, 2017 · 4 comments
Labels

Comments

@nrc
Copy link
Member

nrc commented Jan 23, 2017

We should have a document, probably here and in the rustfmt repo, and hopefully blessed by the wider Rust community (doc team? core team? wider support somehow?) in some way, that advocates for the principle of automatic formatting and for doing so using the defaults rather than customising. Some maintainers may need persuading that using Rustfmt is beneficial and we should lay out the benefits in detail.

@joshtriplett
Copy link
Member

@nrc Something laying out the arguments for uniformity, ease of contribution across many projects, new-developer friendliness, etc?

@nrc
Copy link
Member Author

nrc commented Jan 23, 2017

yes

@johnthagen
Copy link
Contributor

This issue made me think of a nice Google presentation about the importance they placed in ClangFormat.

TLDR:

  • Humans understand through patterns, so consistent formatting helps humans understand the code more quickly.
  • Debating formatting can consume a lot of time. Ideally community consensus and tools can cut down on the time each individual project/team has to repeat spending this time.
  • Refactoring code and having to subsequently fix whitespace costs non-trivial amounts of time for the developer.

@phaylon
Copy link

phaylon commented Jan 26, 2017

I would like to propose also adding a small note to respect if a project made a choice deviating from the defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants