top | item 25159176

(no title)

fyhn | 5 years 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.

discuss

order

nicoburns|5 years 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|5 years ago

When 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.

chrismorgan|5 years ago

Trouble 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).