Hacker News new | ask | show | jobs
by TheAnswerMan 1977 days ago
Both. Tabs up to the current level of indentation. Then spaces after that for alignment. Spaces never come before a tab, only after and only for alignment purposes.

Everyone likes to take a dump on mixing tabs/spaces. But it solves all problems with both. Everyone can view the indentation width they prefer; 2, 3, 4, 8, whatever. And alignment is always correct no matter what width you prefer. An auto format tool can remove the need to manually deal with anything.

Indent width is a visual effect that should not be mandated. You wouldn't mandate a color scheme for your code base, so why would you mandate indentation width?