(2) context is super easy to apply, an editor can very reasonably enable or disable ligatures depending on where they are in the code: sublime text does this already
Ligatures in programming fonts: hell no (2019)
21–30 of 201 posts
Re: Ligatures in programming fonts: hell no (2019)
#22I've witness many a question after/during technical slides where the audience was confused by symbols. At a bare minimum, don't use ligatures in slides or blog posts or anything meant for a broad audience. Ideally, languages would support Unicode as well so you can mean what you say when you type—some folks will naturally prefer this to “keyboard-compatible” options and this should be fine (though ask many non-Anglop…
This seems a much more reasonable take
Re: Ligatures in programming fonts: hell no (2019)
#23I gotta say I’m a little tired of using * for multiplication. It’s time for programming languages that use Unicode characters for operators, and let the editor replace != with the Unicode slashed equals character. No ligatures, just operators.
The former doesn't help in programming. The latter is fairly standard for ideographic languages, and has been well worked out for Chinese and Japanese.
Re: Ligatures in programming fonts: hell no (2019)
#24Sorry, as a Lisp person, I don't see the problem. In Dybvig's typography, it's evident that an opening quote which looks like a 6 is the quasi-quoting backquote, and the closing quote is the regular quote.
It is legitimate for the apostrophe to appear as either a vertical tick or a 9 shape:
https://en.wikipedia.org/wiki/Apostrophe
Particularly this section:
https://en.wikipedia.org/wiki/Apostrophe#Typographic_form
Evidently, the 9 shape is the "typographic form" whereas the straight tick is "typewriter". The last paragraph of that section claims that this was a simplification for typewriters so that the glyph could fulfill multiple roles at the same time (including, possibly, simulating an exclamation mark, if overlaid over a period!)
In the USASCII system, there is only one character code for this, so in a given font, you get only one or the other. In a font where the ' character looks like a 9, you want ` to look like a 6. Or else if ' looks like a vertical stroke, then ` looks like a backward-slanted stroke of a size which harmonizes with that one.
It looks like the printed version of Dyvbig's book has a font which is typewriter-like, but uses the typographic form for these glyphs (thus undoing the hack that was perpetrated for the sake of typewriters). It's quite readable; there is no mistaking the forward tick for the backtick.
I now want a programming font which has those.
Re: Ligatures in programming fonts: hell no (2019)
#25> Whereas ligatures are going the opposite direction: making distinct characters appear to be others. Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Use of ligatures on my setup does not force anyone else to use them? They’re not “viral” like a language feature. “Oh but what if the >= Unicode symbol ends up in your source code and you don…
Later in the submission, Butterick addresses this directly, and doesn't disagree:
> “What do you mean, it’s not a matter of taste? I like using ligatures when I code.” Great! In so many ways, I don’t care what you do in private. Although I predict you will eventually burn yourself on this hot mess, my main concern is typography that faces other human beings. So if you’re preparing your code for others to read—whether on screen or on paper—skip the ligatures.
Re: Ligatures in programming fonts: hell no (2019)
#26Re: Ligatures in programming fonts: hell no (2019)
#27Earlier quoted context omitted.
It's probably fine for you reading your code. It's not impossible it causes others reading your code some confusion when they render it with ligatures or receive eg pdf of it in ligatures, distinct from how it looks when they edit it. Minor issue mostly. I tend to "no", but for no very good reason: Aesthetically they're lovely.
Other people reading your code... on your laptop, using your editor? Because on anyone else's computer it's going to be based on their personal viewing preferences. Setting your tab spacing size too large will also make your code unreadable. But only on your computer.
No, rather in your web page, in the slides that you're projecting, in the paper that you typeset into PDF...
The point is not about how you edit your own code. You could even write comments in sanskrit, if they are for your eyes only, but please don't dostribute them!
Re: Ligatures in programming fonts: hell no (2019)
#28> Whereas ligatures are going the opposite direction: making distinct characters appear to be others. Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Use of ligatures on my setup does not force anyone else to use them? They’re not “viral” like a language feature. “Oh but what if the >= Unicode symbol ends up in your source code and you don…
All right, oh my captain, keep the indents and spacing tight on the monospace and sail along!
Btw., anyone still using monospaced fonts in their editors?
Re: Ligatures in programming fonts: hell no (2019)
#29I tried for a while and it had pros and cons. Unfortunately it made me be confused one time too many so I reverted to not using ligatures.
Point is, find what works for you, we don't have to debate about this, and thankfully, we don't commit that stuff so that it becomes flame wars like tabs and spaces.