4 ms·
For instance != is just a way to write something that looks similar to ≠. With ligatures, you can actually see the symbol you're representing, and not an approx
by fyhn 6y ago
For instance != is just a way to write something that looks similar to ≠. With ligatures, you can actually see the symbol you're representing, and not an approximation. I suppose that is the appeal. And it looks neat.
- nicoburns 6y ago> With ligatures, you can actually see the symbol you're representing, and not an approximation. I think the flip side (which is why many people don't like them) is that with ligatures you can't see the actual code that you've written, only an approximation.
- yoz-y 6y agoWhen I'm reading the code I need to understand what it does, the underlying characters are just a medium. I can see way quicker that a complex boolean expression is wrong when I see ≠ instead of != and ⪖ instead of >=. I do agree with the Butterick that when presenting code to others, for example as examples, the ligatures are a big no, because in this case you actually need to see what characters you need to input.
- nicoburns 6y agoIn that case it works reasonably well, but how do you represent the difference between `=`, `==` and `===` in javascript. IMO =, == and === is much clearer and more visually distinct than ≔, = and ≡.
- yoz-y 6y agoMainly a force of habit. But I agree that for equalities a split sign would be clearer for most people. I won't be going around and trying to convince people to use or not use ligatures though. I feel that it is a very personal preference much like the choice of syntax colouring theme.
- hydroxideOH- 6y agoI never use == in any circumstance anyway, but telling the difference between the == and === ligatures are really not hard. The === one, at least with JetBrains Mono, is much larger.
- chrismorgan 6y agoTrouble is, that argument falls apart because != is only akin to ≠ if == is actually =. If you use a language with := for assignment and = for comparison (or something similar), sure, making != appear as ≠ might make sense. But if you’re using almost any C-family language, you’ve already broken the mathematical model of what the equals sign means. After that, I side with nicoburns and say that now you’re obscuring what it actually means (in favour of something that’s more or less incorrect in mathematical notation).
- OJFord 6y agoSo, use the right ligatures for what you're doing. Iosevka has several presets, or can be completely configured: https://github.com/be5invis/Iosevka#ligations https://github.com/be5invis/Iosevka#ligations