Earlier quoted context omitted.
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?
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?
Programming with proportional fonts is great
11–20 of 52 posts
Re: Programming with proportional fonts is great
#12i don't know. Taking a clojure example : (defn say [word] (println "You said" word)) This wouldn't be possible without fixed width. Now a lot of languages don't use that kind of indenting a lot, but in lisps it's mandatory. Also fixed width ensures that you can write code and it will lay in the same way on other computers, regardless of what other fixed width font they're using. That's a big big point i think, since…
Re: Programming with proportional fonts is great
#13I can't stand proportional fonts for programming. Aside from it being harder for me to read, inability to use any sort of ASCII art, etc, it just feels sacrilegious. Not to mention my editor of choice (TextMate) fails horribly with proportional fonts. But then again, I used to feel the same way about anti-aliased programming fonts, and have since switched. Currently Inconsolata 16pt anti-aliased is my font of choice.…
That actually makes me support the idea of using proportional fonts even more.
- If something's that complex you need a diagram to support it, that probably doesn't belong in your code - you should maintain documentation in documentation format, and doc updates shouldn't mean new code revisions. Throw a URL to the documentation in as the comment.
- Diagrams could be illustrated much better with an actual diagram rather than an ASCII visualization of one.
Re: Programming with proportional fonts is great
#14i don't know. Taking a clojure example : (defn say [word] (println "You said" word)) This wouldn't be possible without fixed width. Now a lot of languages don't use that kind of indenting a lot, but in lisps it's mandatory. Also fixed width ensures that you can write code and it will lay in the same way on other computers, regardless of what other fixed width font they're using. That's a big big point i think, since…
I agree, but I think it would be possible to have proportional text aligned properly if you are working above the level of raw text, as in with sexps in paredit.
Of course, you'd have to decide which to do - above or below. There are reasonable heuristics for that, but they're probably more complicated and less accurate.
The nice thing about doing it this way is that it degrades perfectly when the code is viewed in fixed-width (which is good for tools and other developers).
Re: Programming with proportional fonts is great
#15Re: Programming with proportional fonts is great
#16Re: Programming with proportional fonts is great
#17A big difference was probably the fact that the codebase I was editing used tabs for indenting and had non-ascii art indenting rules (basically just indent the next line).
Re: Programming with proportional fonts is great
#18I can't stand proportional fonts for programming. Aside from it being harder for me to read, inability to use any sort of ASCII art, etc, it just feels sacrilegious. Not to mention my editor of choice (TextMate) fails horribly with proportional fonts. But then again, I used to feel the same way about anti-aliased programming fonts, and have since switched. Currently Inconsolata 16pt anti-aliased is my font of choice.…
> inability to use any sort of ASCII art That actually makes me support the idea of using proportional fonts even more. - If something's that complex you need a diagram to support it, that probably doesn't belong in your code - you should maintain documentation in documentation format, and doc updates shouldn't mean new code revisions. Throw a URL to the documentation in as the comment. - Diagrams could be illustrate…
Re: Programming with proportional fonts is great
#19I can't stand proportional fonts for programming. Aside from it being harder for me to read, inability to use any sort of ASCII art, etc, it just feels sacrilegious. Not to mention my editor of choice (TextMate) fails horribly with proportional fonts. But then again, I used to feel the same way about anti-aliased programming fonts, and have since switched. Currently Inconsolata 16pt anti-aliased is my font of choice.…
> inability to use any sort of ASCII art That actually makes me support the idea of using proportional fonts even more. - If something's that complex you need a diagram to support it, that probably doesn't belong in your code - you should maintain documentation in documentation format, and doc updates shouldn't mean new code revisions. Throw a URL to the documentation in as the comment. - Diagrams could be illustrate…
- is always within easy reach of the eye.
- is harder to forget about when changing the code.
- doesn't require you to download, install, register and fire up Visio Community Edition 2008 to add a new FileLogger node to the illustration of the data transformation tree.
Re: Programming with proportional fonts is great
#20It's hard to keep code within the 80 char per line limit of PEP8 without using fixed-width.
"Limit all lines to a maximum of 79 characters."