Earlier quoted context omitted.
> 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. 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…
That's a good advice, isn't it? Thanks for pointing to it. But it is interesting still, how many seem to read the text it feels to them touching their privates and need to make themselves vent off.
Ligatures in programming fonts: hell no (2019)
121–130 of 201 posts
Re: Ligatures in programming fonts: hell no (2019)
#122Earlier quoted context omitted.
You don't even have to go as far as a triangle. There are two sets of the latin alphabet in unicode and two sets of the greek. The normal one and the maths one. And the mu on your keyboard is not the same on a windows machine and a linux machine. (Alt Gr + m, at least in my language)
For portable code, use UTF-8 only, and only the part in ASCII. This also helps to distinguish digits from alphas etc. Unicode is a different code. (and as I learned today, Julia code might be exclusive here)
Re: Ligatures in programming fonts: hell no (2019)
#123Why? This brings us to refute of point two: lack of semantic substitution is a hypothetical problem (it could easily be solved though by parsing the source before substituting).
But here is the refute: how often do I come across this?
And how, exactly, could I shoot myself in the foot with it?
The author omits answering that question.
I studied typography alongside CS and worked in the former field for years so I have strong opinions on use of type for stuff other people look at.
My editor is, however, something only I look at.
I use code-type fonts with ligatures since years in various editors (vscode the last four), writing mainly Rust. I never ran into either issue one or two.
Re: Ligatures in programming fonts: hell no (2019)
#124Re: Ligatures in programming fonts: hell no (2019)
#125Re: Ligatures in programming fonts: hell no (2019)
#126> if you’re preparing your code for others to read—whether on screen or on paper—skip the ligatures. The article should have led with this. Instead this main caveat is buried in a paragraph, where it is preceded by, what boils down to, "do what you want, but you will recognize its wrong someday." Of course people will focus on that part and on the most prevalent use of ligatures in programming: In their own local edi…
(Not making you look: U+0394 GREEK CAPITAL LETTER DELTA vs U+2206 INCREMENT)
Re: Ligatures in programming fonts: hell no (2019)
#127It’s like a rectangular sink with sharp edges that’s hard to clean. It’s like writing javascript without semicolons: yes, it’s prettier, but you gotta keep yet another set of rules and exceptions in mind to get it right.
For example, a JS regex like /=foo/ combines the /= into a ligature in Fira Code with default settings. That’s just confusing right? The / is a delimiter and the = is part of the regex itself. It means you need to keep like 0.5% of brainspace available for “reverse parsing” the ligatures on your head. Why waste that? Why spend even a tiny fraction of your mind worrying if you saw that thing right?
Re: Ligatures in programming fonts: hell no (2019)
#128Earlier quoted context omitted.
A Compose key is the best general-purpose way. For example: • ≥: Compose > = • ≠: Compose / = You can define your own sequences too, if you want. I like to type exactly what I mean, including curly quotes and dashes and narrow no-break spaces and emoji and so on, but often didn’t like the default mappings (if there were any). As an example, I use this for curly quotes (look at the keys’ locations on the keyboard to u…
Fun but I tend to type code fast . Really dont need an extra modifier key. Not to mention there isnt one on your regular keyboard.
I personally use AltGr (Mac Option) more than compose, since it's tractable to have almost the same layout on *nix and Mac. IIRC the default Mac layout has ≠ and ≤ ≥ in the obvious places, and they are just as easily touch-typed as shifted characters.
Compose is nice (on xkb systems) in that it's very easy to add personal customization to ~/.XCompose for task-specific characters.
Re: Ligatures in programming fonts: hell no (2019)
#129Ligatures in code is choosing form over function. It’s like a rectangular sink with sharp edges that’s hard to clean. It’s like writing javascript without semicolons: yes, it’s prettier, but you gotta keep yet another set of rules and exceptions in mind to get it right. For example, a JS regex like /=foo/ combines the /= into a ligature in Fira Code with default settings. That’s just confusing right? The / is a delim…
Re: Ligatures in programming fonts: hell no (2019)
#130> 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…
Ligatures in a fixed width programming context still take up the full width of the separate characters, so a unicode symbol of the ligature has a different width from the ligature itself, and this is immediately obvious.