Usually, the author is spot-on with his recommendations and I really enjoy reading his website. So I was a bit surprised about this: > When we’re using a serifed text font in ordinary body text, we don’t have the same considerations. An fi ligature always means f followed by i. In that case, ligature substitution that ignores context doesn’t change the meaning. Maybe this is different in English typography - I'm a bi…
Perhaps, but the automatic ligature substitution doesn't know that, and indeed in Times "Kauflete" is rendered with a ligature. Probably because native English speakers aren't used to accent or ligature rules. Anyway, I too agree with the author; if you want ≥ to appear on your screen, it should be in the source text as the UTF-8 bytes for U+2265 and the tooling should understand it. Programming is too fragile to all…
Ligatures in Programming Fonts: Hell No
71–80 of 89 posts
Re: Ligatures in Programming Fonts: Hell No
#72Used judiciously, ligatures can help make code more readable, not less. Consider JavaScript's == and ===, and their inverses != and !==. I personally find them difficult to visually distinguish on occasion (especially the negative forms). Fira Code [0] replaces them with two-bar and three-bar equals signs (something like =, ≠, ≡, and ≢, only wider; see the link for a screenshot). I personally find these easier to dis…
My counter-argument: eslint and tools like that will warn or error when you use `==` when you should be using `===`, up to the point where `==` is considered a code smell (JS's 'loose' comparison has been the target of a lot of brouhaha)
Re: Ligatures in Programming Fonts: Hell No
#73Used judiciously, ligatures can help make code more readable, not less. Consider JavaScript's == and ===, and their inverses != and !==. I personally find them difficult to visually distinguish on occasion (especially the negative forms). Fira Code [0] replaces them with two-bar and three-bar equals signs (something like =, ≠, ≡, and ≢, only wider; see the link for a screenshot). I personally find these easier to dis…
Doing it with ligatures is not a great idea, because ligatures are a PITA (not always well supported) and add too much incidental complexity.
Re: Ligatures in Programming Fonts: Hell No
#74> So what’s the problem with programming ligatures? // They contradict Unicode. The Unicode ligatures in the Alphabetic Presentation Forms block (U+0FB00 - U+0FB4F) are only present for compatibility purposes, so that legacy texts in encodings which contain precomposed ligatures can be losslessly reencoded to/from Unicode. They aren't meant to represent the entirety of all ligatures.
Not to mention entire languages that build structure as complex combining sequences, including emoji and its complex ligatures combining the Zero Width Joiner and multiple emoji into single result emoji.
Re: Ligatures in Programming Fonts: Hell No
#75If anybody wants an example of where ligatures will cause problems, try playing a roguelike in a console using the Fira Code font with ligatures turned on. It demonstrates that accidental collisions end up with completely different glyphs. My first experience with this was with Dwarf Fortress in text mode. But... I have to say that this is the only place I've actually come across it. I eventually decided that I don't…
I'm more looking for an example of where ligatures will cause problems while programming.
Re: Ligatures in Programming Fonts: Hell No
#76Used judiciously, ligatures can help make code more readable, not less. Consider JavaScript's == and ===, and their inverses != and !==. I personally find them difficult to visually distinguish on occasion (especially the negative forms). Fira Code [0] replaces them with two-bar and three-bar equals signs (something like =, ≠, ≡, and ≢, only wider; see the link for a screenshot). I personally find these easier to dis…
I'd argue the inverse. In my experience removing the gaps makes some symbols harder to read. Like distinguishing `==` and `===` without gaps is harder, though admittedly three-bar helps. Also, I find the ligatures I've tried a bit of an eye-sore, but that's just personal taste. What's a more serious concern is the "dumbness" mentioned in the article and the handling of ambiguous cases. To give my own example, in addi…
Re: Ligatures in Programming Fonts: Hell No
#77Earlier quoted context omitted.
No I do not what some ide to start fucking about with code and introducing god only knows strange edge cases. And I use profanity (Engineering language) for good reasons here can you imagine any other engineering discipline allowing this to happen - oh yes the CAD system added a ligature in the bridge design blueprints !!
Ligatures in your editor don't change the underlying, code they just change the presentation of that code when you're viewing it. While a ligature supporting font may show you ≥, the underlying source file still contains the distinct characters >=
Even moveing excel between countries gets some very strange changes Eg changing diacritical's but they look very very similar.
Re: Ligatures in Programming Fonts: Hell No
#78Used judiciously, ligatures can help make code more readable, not less. Consider JavaScript's == and ===, and their inverses != and !==. I personally find them difficult to visually distinguish on occasion (especially the negative forms). Fira Code [0] replaces them with two-bar and three-bar equals signs (something like =, ≠, ≡, and ≢, only wider; see the link for a screenshot). I personally find these easier to dis…
I'd argue the inverse. In my experience removing the gaps makes some symbols harder to read. Like distinguishing `==` and `===` without gaps is harder, though admittedly three-bar helps. Also, I find the ligatures I've tried a bit of an eye-sore, but that's just personal taste. What's a more serious concern is the "dumbness" mentioned in the article and the handling of ambiguous cases. To give my own example, in addi…
I don't think anecdotes of cases where ligatures fail support a case for them being wrong for all people and all situations.
Personally, I've never had a single instance of them doing something dumb in 2+ years of using them. Never a single instance of them creating any ambiguity or failing to add clarity to my reading of code. Dumb in "theory" might be smart enough 99% of the time.
Just in the last couple months, I had to review code without the aid of a linter and they were invaluable.
Re: Ligatures in Programming Fonts: Hell No
#79Is Personally, I'd love a keyboard that had a ≤ key and a programming language that recognized that symbol.
On a mac, hit option + "I can't help you with the language, though.