4 ms·
Code with spaces looks always good. Code with tabs looks good if the other developer has the same tab length, but will not look correctly if it is wildly differ
by lmilcin 9y ago
Code with spaces looks always good. Code with tabs looks good if the other developer has the same tab length, but will not look correctly if it is wildly different, because of the right margin not lining up correctly.
- IshKebab 9y ago> Code with spaces looks always good. Only if you don't care about the indent size, which many people do (otherwise we wouldn't be having this discussion). I mean you may as well say everyone should use Times New Roman because then it always looks good.
- mjevans 9y agoYou only say that because you're MIXING indent styles. Tabs first, ALWAYS, one tab is one level of indent. go fmt uses the UNIX lineage of defaulting to 8 spaces converting to a tab (worded in reverse). Your editor should easily display tab stops at a value that is ideal for you; you could set this to 2, 3, 4, or any other value if it makes things more readable to you.
- concede_pluto 9y agoAs long as I can tell at a glance which lines are more or less indented than other lines, I don't care how big indentations are. Making the right margin line up is a waste of time; I'm not going to spend my entire life staring at a fixed-pitch font to indulge someone else's retro ASCII art hobby.
- marcus_holmes 9y agowait, you right-align your code? How does that work?
- mikewhy 9y agoNot right-aligned, rather that using tabs means that 80 characters in one editor may not be at the same position in another editor with a different tab width.
- marcus_holmes 9y agoI'm not sure how that matters? Unless your team has a very strict "80 chars max" limit on line width I guess.
- deleted 9y ago[deleted]