Hacker News new | ask | show | jobs
by etatester 1 day ago
Ligatures don't belong to code. Code is meant to be "parsed", you cannot spend any additional brain cycles on "beauty" that itself needs parsing.

Like a lot of design trends, it's design for design's sake and it's at odds with its actual intent.

3 comments

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.

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.

Trad ligatures where not in monospace fonts, right? Cannot imagine what `fi` looks like ligatureized, and even less how it would benefit readability.
I originally didn't like ligatures for this reason.

But I decided to give it a shot later and my brain adapted to it just fine. Now when I use fonts without ligatures it just feels like something is missing. It just reads more comfortably with ligatures.

I think the same will happen with the texture healing thing people are discussing elsewhere. I have the impression they will distract me more than help me reading comfortably. I am willing to try it just to see if my brain will adapt to it as well.

I don't even understand why people bother to make this argument. It's someone else's business and has nothing to do with you. Maybe it turns out your colleagues don't even see ligatures because they code orally with Claude. Who cares?

Maybe you look at your colleague's screen and it's all dark yellow and hardly visible to you. Who cares?