Hacker News new | ask | show | jobs
by itaris 3284 days ago
What do you mean? If some devs are using spaces, and some tabs, wont that create pretty unpleasant whitespace differences?
3 comments

It does, and it's awful.

In theory it would work out ok. In practice, people use different tab widths, and don't always notice they are "wrong" when doing a quick change. Next thing you know, you've got spacing like your tab width should be 2, 4, and 8 spaces and you really have a mess.

>don't always notice they are "wrong" when doing a quick change.

I can't understand this! First thing I do when I open up an editor is show whitespace characters. They are part of the source code this should be always be displayed! It would feel wrong to code without showing whitespace.

If you can see your whitespace you can tell right away that it's wrong.

Pfft I just cmd + alt + j every file I touch. Everyone must conform!
Is this[1] what you're referring to? That sounds like grounds for summary execution to me. My group had me write a git commit hook that demands all source files pass a dry-run of astyle before you can commit. It'll let you view the difference and either cancel the commit and fix it yourself or just take the auto-formatted by astyle version and commit that.

[1] https://kau-boys.com/1128/shortcut/shortcut-of-the-month-ctr...

Different teams, not different indentation within the same team.