4 ms·
A few reasons I don't like ligatures when coding: - It makes me have to think too hard to figure out where the boundaries actually lie between characters when
by bobbylarrybobby 4y ago
A few reasons I don't like ligatures when coding:
- It makes me have to think too hard to figure out where the boundaries actually lie between characters when I want to edit. I don't want to think about how many times I'll have to press backspace to delete a single "character"; without ligatures, I don't have to think at all.
- With ligatures enabled, I have to remember how to type each character-group (e.g., that != is the same as slashed equals). With ligatures disabled, I can just read it back from an existing example. In other words, ligatures create a separation between what I type and what I see.
- It makes it hard to quickly compare my code to examples online that don't use the ligatures because, again, I'm forced to translate between what's on my screen and what's in the file.
The only ligatures I appreciate are minor stylistic ones, e.g., raising a colon slightly before a number, adjusting the spacing between two consecutive colons, raising two consecutive asterisks, etc. Changes that don't fundamentally change the code appears but make it a teensy bit more aesthetically pleasing.
- freeCandy 4y agoYour last point on minor changes make a lot of sense. Are there any fonts that do this?
- bobbylarrybobby 4y agoI use Iosevka with just the "kern-dotty" ligatures enabled.
- IgorPartola 4y agoI am with you. When you are inverting your logic and need to delete the ! out of != but you have the ligature version you are prone to making a mistake. Best case, you notice it. Worst case you don’t and create a subtle bug.
- WastingMyTime89 4y agoHow would you make a subtle mistake while turning != into = due to ligatures?
- pluijzer 4y agovar a, b = true; if (a!=b) console.assert(false, "unreachable");
- leshenka 4y agojust aim for the middle of the "=/=". Click right where the vertical line is