3 ms·
http://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo http://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo Of course, once you implement an editor which does a good job
by klibertp 12y ago
http://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo http://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo
Of course, once you implement an editor which does a good job of keeping things aligned even when using proportional fonts, I'll switch immediately. It's not like I didn't try - default font in Pharo is proportional and I tried working with it for a few weeks. Smalltalk syntax is so clean and minimal that I thought it would be ok, but even there I had to change the font to monospace - in the (few, like populating a dict, writing to a stream, things like this) instances where I wanted the code to be aligned I couldn't do this and it was too irritating for me.
- DanBC 12y agoMay I ask: what is being aligned here, and why does it fail? Aligning stuff to a left margin / tab-stop / 4 space set should be easy, no? And are there any non-monospaced fonts that are designed for programming?
- klibertp 12y agoDon't know how well it displays, but I mean something like this: Dictionary new at: #symbol put: #something; at: #symbol2 put: #somethingElse; yourself. Notice how the first "put" is not aligned with the second one here. It looks aligned in Pharo though, when displayed with default font. This alignment may fall fall apart if I so much as change a font. This is bad, and that's why until the editor is able to preserve my alignment across different fonts I'm going to use monospaced ones.
- joshka 12y agoSounds like that formatting scheme would lead to changes on lines unrelated to the change, e.g. if I renamed symbol2 to sym2, the spacing on #symbol will be reduced. To me this sacrifices diff readability for code readability. It's generally not a tradeoff I like to make, but I can see how it is appealing.
- klibertp 12y agoThis is not an issue for me, because - which is strange - the diff viewers I use seem to be more advanced than my editors, in that the diff viewers can ignore unimportant whitespace changes while editors can't handle alignment properly :-) But that is a trade-off, of course.
- seanmcdirmid 12y agoWhy would you want your editor to preserve your alignment across different fonts? Or to be more precise, why does an editor need to bother with multiple fonts. It's not Word or Latex, the code only needs to look good and read well in one font, and that font is most definitely not a mono space one.
- klibertp 12y agoYou mean that all the programmers should use one and the same font across all their editors? I'm sorry, I don't understand. Is my code meant to be read only by me? What do you mean by that?
- seanmcdirmid 12y agoJust as I said, the code has to look good in one font, not N. When I read a paper written by someone else, the first thing I don't do is casually change its font. We invent so many unreasonable reqs to justify the continued used of archaic type writes fonts, sad.
- klibertp 12y agoI'm sorry, I'm really trying to understand your point but I really see nothing unreasonable in wanting to view someone's code displayed with my preferred font without changing the structure of said code.
- DanBC 12y agoI'm a bit confused by some of the replies - you're talking about proportional fonts for a text editor to view fonts. Using a monospace font makes this easy; using a proportional font makes this very hard. How would an editor know what to align? It's not part of syntax highlighting - unless you define your own rules. The fact that this is not available in Vim nor emacs (I haven't checked; maybe it is) would show that it really is a rare want.
- 12y ago