3 ms·
That is _exactly_ what happens when files are saved with tabs. The user then decides how wide to display them.
by dotancohen 8y ago
That is _exactly_ what happens when files are saved with tabs. The user then decides how wide to display them.
- emilfihlman 8y agoIt is ridiculous how people, rather than configure their own system, attempt to force everyone to use their view (tm), as with spaces. The tab was added there for a reason and is flexible. Use it.
- ben509 8y agoIt's less ridiculous than fighting over this stuff in code review. It's usually teams or projects agreeing on a coding standard, and those standards dictate everything other trivial detail. As a developer, you are an author, and you're writing with a "voice." On a team, it's a courtesy to the reader to write with the team's voice rather than your own.
- simias 8y agoOnly for a tiny, tiny portion of what constitutes a coding style (indentation depth) and only if the original code used tabs for indentation and spaces everywhere else consistently otherwise everything looks like crap when you change the tab width. In my experience most tab-indented projects end up mandating a tab width in their coding style and using anything else leads to chaos. See the Linux kernel for example. Besides if you really value this flexible tab width you can no longer impose a maximum line length since it's tab-dependent. Beyond that it's quite weird to make tab width configurable but nothing else. What if I prefer to have opening { on the same line as the function prototype? What if I prefer my identifiers to be in CamelCase? What if I prefer not having spaces around arithmetic operators? All that could be done relatively easily if code was stored as an abstract AST and formatted on demand. Tab indentation is theoretically superior to spaces if used correctly but in practice it's probably not worth the trouble. At least as far as I'm concerned I gave up on tabs a long time ago.