logoalt Hacker News

simonask • today at 7:46 AM • 1 reply • view on HN

You have it the wrong way around, I'm afraid. Traditional ligatures (fi, etc.) are absolutely about readability, i.e. they make it easier to visually parse the text correctly.

For code font ligatures, there is such a thing as going too far, but done tastefully, they can be a help.


Replies

Barrin92 • today at 9:08 AM

Ligatures were introduced for readability because in non-monospaced fonts characters could collide. Given that virtually every person reads code in monospace there's no function to ligatures.

And as for readability, there's an even bigger problem in that semantics matter immensely in programming. != should be replaced by its mathematical operator if you're writing a comparison, but potentially not in a string, comment or regex. Because fonts do character replacement, they're entirely unaware of programming semantics. You essentially add a context unaware level of interpretation on top of what used to be unambigious text.