Hacker News new | ask | show | jobs
by toddh 1735 days ago
Because everyone has tabs set differently, so code always looks wrong, even if you use the same editor. A space is a space is a space.
1 comments

> always looks wrong

Only if you are mixing tabs and spaces in a strange way. If you use tabs reasonably then it looks right to each user's preferences.

I think the reason that spaces are popular are that it is more obvious when done wrong. We should probably just have better code review tools that highlight when tabs are used for anything but initial indentation. It is as simple as /[^\t]\t/.

The other downside of tabs is that you don't have a well defined line width, but IMHO line limits are a fairly silly lint anyways, you should make the code look reasonable. I find that formatters based on line length limits tend to make code very awkward to read.