Hacker News new | ask | show | jobs
by modernerd 2348 days ago
Once I got used to ligatures, they did aid flow for me.

-> now needs more internal “rendering” than → does.

Same with ≡ vs ===

1 comments

That's not a very good thing, especially considering that there are (probably ?) actual unicode characters '→' and '≡' that are not valid syntax for -> and === in languages that utilize the later.
Good for who? In an IDE the person reading them knows what don’t they are using, and so won’t get confused. The IDE itself knows what language the code is in and will highlight invalid syntax.
Languages like Agda allow → or -> interchangeably in the body of the code: https://agda.readthedocs.io/en/v2.5.2/language/lexical-struc...

Most languages only allow such symbols in strings, though, so it's pretty simple:

- Symbols outside of a string literal are ligatures.

- Symbols inside strings are the real symbol.

Ligatures are also rendered differently to any similar unicode characters.