Hacker News new | ask | show | jobs
by kazinator 3288 days ago
Alignment isn't a minimal benefit; it is super important.

It's not just for neatness; either. Alignment shows where differences are between similar lines. And not necessarily consecutive lines. For instance, if we rapidly flip the editing window back and forth between two buffers showing similar code, we can see the differences as the moving parts in a two-frame animation.

Even in proportional fonts, the digits 0 to 9 get the same width. Why? So that tables of figures will look reasonable.

We don't want 1111.11 looking narrower than the 100.00 in the preceding row.

I want everything to be crisply aligned between lines like:

   xr = x * cos(theta) - y * sin(theta);
   yr = x * sin(theta) + y * cos(theta);
This makes it easy to see where the differences are. Any gratuitous deviation from the alignment is visually distracting. I want to be able to scan the thing vertically y and see that I have two x's, two y's, cos/sin sin/cos, and -/+ at a glance.
1 comments

This must be why math literature has been using fixed width fonts for hundreds of years! No way you could ever align something with (hugely more readable) proportional fonts. BTW, numerals are not automatically same width in proportional fonts; a good font will often have both (and for tables you'd explicitly switch to tabular figures, which will align properly).