book icon indicating copy to clipboard operation
book copied to clipboard

de-emphasize spacing vs. tabs

Open romainmenke opened this issue 2 years ago • 0 comments
trafficstars

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.

romainmenke avatar Oct 28 '23 09:10 romainmenke