4 ms·
I initially had this same reaction. Well, perhaps less stridently assembled, but my initial take on it was the same: that ligatures for coding fonts were object
by veidr 3y ago
I initially had this same reaction. Well, perhaps less stridently assembled, but my initial take on it was the same: that ligatures for coding fonts were objectively dumb.
But, I was wrong. In several years of using them now, there has never been even one case of the theoretical "mistaking a different glyph that looks similar to the ligature" or "mistaking a ligature character sequence for a single character".
It's never happened to me, and I have never heard of it happening to anybody else that I know either. If you have a U+2260 in your code, and that's not valid in your programming language but your editor isn't flagging it as an error, then you have way bigger problems than ligatures.
On the flip side, though, it has absolutely made it easier for me to scan and read my own code, and the code of other people. So what I initially thought was "all downside, no upside" turned out to be quite the reverse.
Note the "for me" qualifier, though; I get that not everybody benefits in these ways. YMMV. I like speed metal, avocado toast, ligatures, and Allman brace style. You may not like these things.
But only that last one has any effect on others. If I insist on using my favorite brace style, sure that's annoying if you have to regularly work with my code and you prefer one of the incorrect brace styles like K&R.
But ligatures don't affect you; they just make my life better. Therefore, it's not a topic worthy of controversy, or of trying to tell other people whether or not they should be using them.
- scotty79 3y ago> Allman brace style If only that could be as easily configurable in IDE as liatures.
- veidr 3y agoIndeed. I think we’ve gotten a lot closer in the past few years though (after wanting this for almost 20 years without progress). Rust’s language service (optionally) adds phantom code to several modern editors, showing inferred types in the editor, that aren’t really part of the source code. That is very nearly the same thing...
- wffurr 3y agoMy takeaway from this article is that I want to go try Fira Code now.
- miniBill 3y agoDo it! It's great!
- d3nj4l 3y agoIf you bounce off Fira (for whatever reason) also try out JetBrains Mono - incredible font with great ligatures!
- manaskarekar 3y agoTry Hack too.
- sparkie 3y agoI like JuliaMono. The main reason is I find the Unicode support much better. With Fira Code, some Unicode characters have varying widths even though it's supposed to be monospaced, making it sometimes look like a proportional font. JuliaMono doesn't seem to have this issue. Example with Fira Code: https://i.imgur.com/YqlzgTE.png https://i.imgur.com/YqlzgTE.png Example with JuliaMono: https://i.imgur.com/41aHGVM.png https://i.imgur.com/41aHGVM.png https://www.programmingfonts.org https://www.programmingfonts.org has a nice list, but besides JuliaMono only one other font on the list retains proper monospacing for less frequently used Unicode characters. You can test this by pasting the example below: ⋈ : naturaljoin ⋉ : leftsemijoin ⋊ : rightsemijoin ⟕ : rightouterjoin ⟖ : leftouterjoin ⟗ : fullouterjoin