Please stop it with the "coding ligatures" already. They are not helpful and only serve to obscure the code being written.
This has got to be one of my least favourite trends in programming aesthetics these days. For a font claiming to "follow function" to devote so much effort to sacrificing function for the _vogue du jour_ is especially rich.
Serious (if goofy:) ) question: How do I not use them?
My understanding is that if the font has ligatures then the way to not use them is to use a different font (which is fine - there's a lot of fonts out there :) ).
Is that the only way, or is there a way to disable ligatures but keep the rest of the font? Can you disable only some of the ligatures?
Ligature is a optional feature, first the editor need to support them, but I guess most editors nowadays already support that. JetBrains IDEs come with JetBrains mono and with ligatures enabled, last time I used VScode I had to enable manually for my new font.
Ooh the selectively disabled extension is really cool! Thanks!
I sometimes—rarely happens thought—dislike how the cursor renders on top of ligatures in vscode. Always wished it would allow me to "inject" the cursor into the ligature, but since it didn't happen often or bother me as much, I never tried looking for a solution. This will be a small, but much appreciated quality of life improvement! Thanks again!
regular fonts are basically "use this image for 'a', this image for 'e'" etc. ligatures are extra data that says "if you find an 'a' next to an 'e', use this other image in place of the 'a' and 'e' images". but the non-ligature versions of characters are still in the font for use when there is no ligature sequence (just put a space in the middle of any ligature in your editor and you'll still see the independent characters rendered in the font).
I mean... The existence of ligatures is almost by definition strictly aesthetic. And on that measure, it either brings you a smile to notice that f and i, for example, are joined; or you didn't even notice it.
That is, I won't claim they help readability. But they do make me smile, and don't seem to hurt. (I'm assuming they disappear on copy operations. Mac OS' habit of replacing -- with a longer dash is painful when sending cli arguments.)
When I'm reading fiction, I generally don't mind ligatures. I find them oppressively obscurantist in any situation where I want to know clearly and distinctly what each character is -- i.e. code and science/math/engineering.
Not sure why you are taking offense in that. I wrote that they make me smile. Despite that, I'd also wager that the vast majority of the time, I don't notice them.
- there are more fonts without ligatures than there are fonts with ligatures.
- every single OS I can think of include by default a monospace font that do not support ligatures.
- there are still a huge amount of terminals which do not support them.
- for almost any font that has ligature there is a variant without ligature
- there is virtually no way to end up with ligatures without actively looking to get ligatures.
- any terminal/editor that supports ligature has a setting for that.
- most people do actually like ligatures which is the reason they use those editors/terminal/fonts and want those activated by default.
Presence of ligatures in a "font designed for developers" is neither a plus nor a selling point. It is a pointless embellishment that shows that fonts' authors don't grok the character-oriented nature of computer languages. So them parading ligatures as something desirable only serves to detract from the rest of the font design and to nick their credibility as coding font designers.
> fonts' authors don't grok the character-oriented nature of computer languages.
Hogwash. They provided all the characters (which ligatures are also, but you seem bizarrely "against" but "for" the ASCII ones), and ligature-less versions as well. So they grok it at least that far.
For what it's worth I also have ligatures disabled but I do think it's fair for fonts to include them, particularly because it makes the fonts more versatile in settings where you want them.
In particular when doing presentations having fonts that are capable of producing ligatures in monospace contexts is quite useful.
I would concede your point if these folks were trying to sell you a used car.
You don't need to take their word or rely on their credibility for anything. There's a demo right there of the font for you to decide if it's for you or not.
I wonder if there’s a correlation between enthusiasm for ligatures and programming styles or languages.
I want to learn Julia in part because it makes use of “fancy” chatacters (so your math looks like math). I like the more functional JS style, and I’m interested in haskell. And I love ligatures. Anedata of one.
Are you more a C-family person, or an ML-family person?
I kind of agree with you, but I see them authors as avant-garde. Let them be and perhaps something new or an improvement will come out of it for the rest of us.
A ligature is more functional than not using one. They obscure the code for about 5 seconds the first time you see them, and then never again. After those 5 seconds, you register a new semantic symbol in the brain. It is objectively easier for your brain to parse a single arrow symbol than it is to parse => in a monospace font. For the latter, you are scanning two symbols and only after seeing them both can your brain put them together into a semantic meaning. This is strictly worse than just seeing an arrow symbol and understanding it is an arrow.
> It is objectively easier for your brain to parse a single arrow symbol than it is to parse => in a monospace font. For the latter, you are scanning two symbols and only after seeing them both can your brain put them together into a semantic meaning.
For me the problem with ligatures is not so much of recognizing them but reproducing. I know that for arrow ligature I have to have = and >, but there may be ligatures that I might not be sure of how they're formed. Also, when reading the same code in different environment where the same font is not available I get different visual output where not only is the base shape of the letters different but code units as well. For example three lined equals ligature that some fonts produce. I really hate it.
If your programming language wants to use an ⇒ symbol there's a perfectly good codepoint for that already. I don't want complexity to be hiding in my font where I would never even think to look for it. (For example imagine searching the documentation to understand a use of ⇒ and finding it doesn't exist in your programming language)
My programming language doesn't want to use it; I do. If you would "never even think" to realize that ⇒ in your editor is actually =>, after having installed a programming ligature font where that is always advertised, that's on you. And any developer should already be well aware that no common language uses symbols beyond ASCII, so seeing ⇒ should be clear enough already that it's a ligature. I really think this 'confusion' argument is made up and has never actually occurred for more than 5 seconds.
Semantically, the language would like to use a ⇒, because it's representing the idea of an arrow. It's only due to keyboard constraints that it has use use =>. Parsers (and our brain is also a parser) would be much easier to implement if meaning didn't have to derive from symbol combinations like =>, !==, <!--. The input interface is limited to ascii to represent meaning, but our eyes don't need to be.
> If you would "never even think" to realize that ⇒ in your editor is actually =>, after having installed a programming ligature font where that is always advertised, that's on you.
Sounds like we agree that a font that does this should never be a default. I don't think customized environments to the extent that one developer sees a different view of the code from another are a good idea (partly because I think reviewing and pair-programming are very valuable), but I guess if you want to set up something like that it's fine as long as you're not pushing it on anyone else.
> And any developer should already be well aware that no common language uses symbols beyond ASCII, so seeing ⇒ should be clear enough already that it's a ligature.
I've been using ⇒ in Scala for over a decade, shrug.
I agree it should not be a default. I think much like using the keyboard to navigate the IDE, it's something you can do that brings a benefit once you're familiar with the basics. I don't think vim should be the default terminal editor for the same reason, but I still think vim is worthwhile to use.
Ruby and scala allow using such characters, and there are libraries that use it. Julia actually has special characters in the standard library, although afaik they all have ascii aliases. The repl and many editor plugins support expanding tex style escapes to those special characters.
I use Fira code, and the ligatures for >=, <=, !=, ==, and -> make it so much faster and easier to identify the symbols.
I wouldn’t know where to get the “⇒” codepoint, and getting is probably more effort than just writing “==>” with the added benefit of my teammates not having to use the ligature (or figure out the symbol) if they don’t want to either.
If this wasn't a discussion about monospace fonts, I might be inclined to agree with you. However, I kinda agree with the detractors here; ligatures objectively defeat the purpose of equally-spaced characters. The purpose of monospace fonts is to provide definitive clarity where sans and serif fonts fail to do so. In the world of programming, maintaining that consistency is essential. Having one symbol span several spaces undermines that clarity, you may as well be reading your code with Helvetica at that point. I understand that programming is a career path filled with creature comforts and obscure little things that make you happy; I even enjoy the warp cursor (gasp!) in VS Code, which definitely doesn't contribute to clarity. Let's stop treating ligatures like a direct upgrade over normally printed monospace, though. It's an option, one that shouldn't come enabled by default but one that should be available for people who want them for whatever reason.
Monospace fonts are used mainly because vertical alignment is desirable, and because characters such as ! and . are too narrow to easily read in proportional fonts. Monospace, then, improves clarity. Turning a => into a ⇒ does not affect the vertical alignment nor make anything too narrow to read. It just turns a combination of symbols into its semantic meaning. It allows you to parse a meaningful glyph rather than using a hacky workaround to represent meaning via ascii. This is also the point of emojis: (-_-) is fine, but most people find <expressionless face emoji> to be more clear as to the meaning. Nobody is getting confused about what these ligatures mean. They installed the fonts and selected the fonts in their IDE; they have already been coding; they are not going to see ⇒ where a => used to be and have a brain meltdown.
Is ligature rendering context-sensitive? If I put => in a string literal in JavaScript/TypeScript and the IDE "helpfully" decides to apply ligature to it, I'm gonna go insane.
This has got to be one of my least favourite trends in programming aesthetics these days. For a font claiming to "follow function" to devote so much effort to sacrificing function for the _vogue du jour_ is especially rich.