Hacker News new | past | comments | ask | show | jobs | submit login

Proportional fonts do not work well with space-based alignment, but are fine with tabs.



Actually, you can't reliably use tabs for column alignment with proportional fonts. You can get everything aligned for the font you're using, and the tab width you've specified in your editor, but when someone else views the code in a different proportional font or a different tab width - or in a monospaced font! - they will likely see "off by a tab" errors.

Proportional fonts do work fine with tab-based indentation. If you stop using column alignment, as I did many years ago, then it no longer matters whether you use proportional or monospaced fonts, and it doesn't even matter whether you use tabs or spaces for indentation. All sorts of code fomatting questions just become non-issues.

And column alignment was always such a hassle, I was glad to give it up anyway. Column alignment is a pain to maintain - it all too often just ends up misaligned after people work on the code, it messes up version control diffs, and the occasions where it helps readability are easily matched by the occasions where it hurts readability.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: