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

de-emphasize spacing vs. tabs #3759

Closed
romainmenke opened this issue Oct 28, 2023 · 0 comments · Fixed by #4150
Closed

de-emphasize spacing vs. tabs #3759

romainmenke opened this issue Oct 28, 2023 · 0 comments · Fixed by #4150

Comments

@romainmenke
Copy link

romainmenke commented Oct 28, 2023

This line does all the work in this little program: it prints text to the screen. There are four important details to notice here.

First, Rust style is to indent with four spaces, not a tab.

I was absolutely surprised that rust has a default style format that uses spaces when that is objectively worse but I respect that some people have opinions and that those opinions won that style choice.

However this choice is given extra emphasis without context in the book.
It is the first thing you learn about the first hello world example.

I personally do not see the value in calling this out at this point in the book.
It doesn't add any value here for persons learning rust.

Imho it can be omitted.

Alternatively it would be more inclusive if the book immediately explained that this is a preference that can be overridden.

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

Successfully merging a pull request may close this issue.

2 participants