I've been programming for over three decades, on many different systems with many different fonts. This topic pops up every so often but I cannot help but think that to me, it's the ultimate bikeshedding...
Dev Fonts
271–280 of 342 posts
Re: Dev Fonts
#272Earlier quoted context omitted.
Personally, my eyes and brain just can't scan ligatures in code efficiently, I have to double read the code, especially "is that =, ==, or ===? Oh, and that's !==" (edit) I'll additionally qualify my comment, from a mathematics background I can casually scan a handwritten "!=" which is the same as the ligature, but I just cannot retrain my adult brain to accept the ligature version which is the same as the handwritte…
Not for comparison, but for boolean checks I prefer to use `foo == false` instead of `!foo`, the latter is easy to overlook.
Re: Dev Fonts
#273Earlier quoted context omitted.
That might work until there's somebody who uses double negation !! for some reason. But this might only be common in JavaScript, so YMMV.
I had to google this to see why on earth you would use double negation. Apparently it's a way to negate and convert to boolean.
Re: Dev Fonts
#274Earlier quoted context omitted.
I'm not clear on the outcry against ligatures. This is a client-side setting and not committed to code, is that right? If so, this is like prescribing that we should use dark-mode over light-mode because I like it. Now during the pandemic we might screenshare more often so I can disable it for that, but for development on my own time on my own screen it's nonyabizness.
I was going to complain about them because there are a few fonts there I like a lot, but not the ligatures. Wasn't sure if it was = or == or === in the samples.
Re: Dev Fonts
#275My favourite monospaced font is Triplicate https://practicaltypography.com/triplicate.html >: the only true serif monospace that I know of (though I have a vague feeling I found one other at some point). Every other serif monospace I know of is a slab serif. Triplicate’s variable stroke thickness is also exceedingly rare in monospaced fonts; almost everyone goes for uniform stroke thickness, as is customary with sans…
Personally, my eyes and brain just can't scan ligatures in code efficiently, I have to double read the code, especially "is that =, ==, or ===? Oh, and that's !==" (edit) I'll additionally qualify my comment, from a mathematics background I can casually scan a handwritten "!=" which is the same as the ligature, but I just cannot retrain my adult brain to accept the ligature version which is the same as the handwritte…
Obligatory digraphs/trigraphs reference: https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C
Re: Dev Fonts
#276I don't see ligatures solving any important problem. If you think they do, I'd rather change syntax highlighting to recognize !== and others as a single token . It's like multi-select in text editors. When you think about it, it's actually an inferior form of search&replace. Inferior because it interacts badly with off-screen matches. I find arguments of kakoune users unconvincing. My personal opinion is - and I'm fi…
I see ligatures as solving, imperfectly, the problem of "my language has clumsy operators because it wasn't designed with support for unicode operators" lining up with the preference of "I prefer less-clumsy operators".
If you don't have the first problem then, even if your language also supports ASCII multicharacter operators, its just an autoformatter issue.
Aside from the ambiguity with similarly-appearing genuine single characters, programming ligatures tend to not really solve the problem they set out to in monospaced fonts, where you end up with a single symbol which invariably preserves the width of the ASCII multicharacter symbol, which either introduces extra empty space or extra visual weight or, often, both.
> My personal opinion is - and I'm fine taking negative karma for this - that ligatures mostly appeal to the front-end developers among us.
I've seen more praise for them from corners of the Haskell/Idris community than from the much larger front-end community. I don't think there is any real correlation between working in front-end and preferring fonts with ligatures.
Re: Dev Fonts
#277Am I the only one who uses a proportional font for coding? I find it more readable for the same reason it's more readable in books and other printed media.
No, I do it too.
> I find it more readable for the same reason it's more readable in books and other printed media.
OTOH, its really annoying when you edit code from someone who decided to try to "beautify" code by using alignment beyond indentation.
Re: Dev Fonts
#278Re: Dev Fonts
#279Earlier quoted context omitted.
Personally, my eyes and brain just can't scan ligatures in code efficiently, I have to double read the code, especially "is that =, ==, or ===? Oh, and that's !==" (edit) I'll additionally qualify my comment, from a mathematics background I can casually scan a handwritten "!=" which is the same as the ligature, but I just cannot retrain my adult brain to accept the ligature version which is the same as the handwritte…
Not for comparison, but for boolean checks I prefer to use `foo == false` instead of `!foo`, the latter is easy to overlook.
if ( ! isLast(e) ) reads perfectly, especially since my native language doesn't insert the "not" im the middle like english does and my brain is used to that. if (isLast(e) == false) just jolts me out of that state where code reads as fluently as text. YMMV, of course, and I have a suspicion that your native language might play a role in that...