|
|
|
|
|
by seanmcdirmid
3254 days ago
|
|
Unicode sucks for this kind of thing, since it would go on disk. Even if they don't go on disk, you have to figure out how to break them up into multiple characters so they can be edited (so ⇒ must be two characters, which is messy). No, Unicode isn't the answer. It is the answer to deali with someone who isn't using a specific font, like readers on hackernews. Ligatures are a cake and eat it to. To those who don't care for them, they simply don't see them. As they are under control of the font, editors don't need special support either. |
|
It going to be hard to express the intent when programming if you never write that expression onto non-volatile storage.
> break them up into multiple characters so they can be edited
Several different methods exist for editing Unicode. (e.g. [1])
> As they are under control of the font, editors don't need special support either.
That's exactly the problem. Most editors used for programming already understand the full syntax for many programming languages, while font-ligatures only match short character sequences. As the article mention, this will incorrectly replace some things that happen to share the same sequence of characters. There are also problems[2] in editors with storage or drawing boundaries in the middle of a ligature. Mapping the correct characters to a replacement glyph is a lot easier when you understand the surrounding grammar.
[1] https://docs.perl6.org/language/unicode_entry
[2] The bug tracker for FiraCode has several reports of