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

When I tried this I liked it, too, but after a week or two gave it up: I write code for others to read, and, sadly, they will be reading it in a fixed-width font.



I'm not sure I understand. Was using a proportional font changing the way you chose to format the code to such a degree that it annoyed people?


Using a proportional font will break if you try to align code other than using indentation, e.g. aligning assignments.

More examples: http://mysite.verizon.net/astronaut/vim/align.html#Examples

Of course, I really hope nobody's coding like that. I've never seen anyone who's been able to maintain that kind of formatting consistently.

I don't see any reason why proportional fonts shouldn't work for most programming styles. The problem is that most existing proportional fonts aren't very well suited for programming. At the very least, you need a font with unambiguous shapes for similar glyphs, like 1lI0oO`',.;:


Leading spaces aren't much of a problem, but aligning comments on the right-side is much harder due to the variable widths of each line. And even if you align them in your editor, they'll be misaligned for people who use fixed-width fonts. Does that make any sense?


Use a word processor (or a text editor that allows for fixed tab stops). This will also allow insertion of diagrams and other non-textual stuff (think clickable buttons, for compilation and testing, for example) into source code.

See, for an example implementation, BlackBox Component Pascal - Windows only, but runs moderately well under Wine.


It does. However a lot of people avoid comments on the same line as code.




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

Search: