I don't get why the default for #rustlang is 4-space tabs. It's a pretty verbose language, so you'd think you want the extra horizontal room, no? I'm glad I can easily change it with rustfmt.toml though!

@edward you prefer 2? IME it looks like a word soup with such small indents

@EyalL Ah I disagree 😅 I am used to 2 with ruby/js/yaml/html/css/others and never once thought it looked better as 4. But I am new to rust code so maybe it will make sense the more I use it.

@edward
I got used to 4 spaces indentation so i prefer over 4 spaces. Personally, I feel it is easier to read than 2 spaces.
@EyalL

@AstraKernel @edward @EyalL

Bah, rustfmt.toml: hard_tabs=true, use them only for indent, and then everyone can be happy.

@ambihelical @AstraKernel @edward I've yet to see an editor or a project where that did not degenerate into a mess

Follow

@EyalL @AstraKernel @edward I've seen it done with one company I worked for, it worked. There was a good code review culture there, so I think that will be required.

@ambihelical @AstraKernel @edward code review tools mostly don't differentiate tabs from spaces so it's very hard to catch the mess

Invisibly different characters are a bad idea

@EyalL @AstraKernel @edward
Honestly it was not even close to an issue. Mainly because we set tabs to be visible in our editors (vscode, vim, and emacs) and code review tools (gerrit I think it was). And we were all pretty good developers. If you have poor tooling or developers I can see where it might be a problem 🤷

@ambihelical @AstraKernel @edward I wouldn't say they are poor because of they don't invest in tab distinguishing.

We judge developers based on slightly more important traits 😂

So using only spaces frees up resources to deal with more important stuff

@ambihelical @AstraKernel @edward and as I said, all tab using projects I've seen everywhere, including the Linux kernel, end up with messy space and tab mixes

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.