4 ms·
Ligatures 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 semi
by skrebbel 3y ago
Ligatures 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 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?
- seanmcdirmid 3y agoFor any language that uses / as a delimiter, well, you probably don’t want to use a font that does something special to /=. Rendering should also avoid using ligatures in quotes (strings, where reflex might be used in Java or Kotlin). I see ligatures as potentially good, but not unless they are integrated into the language’s lever rather than provided directly by a font.