💾 Archived View for circadian.gemlog.org › 2023-05-09-proportional-coding.gmi captured on 2023-11-04 at 11:38:09. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-28)
➡️ Next capture (2023-11-14)
-=-=-=-=-=-=-
We are told—correctly—that readability of code is of primary importance in large codebases. And yet, most programmers miss a simple trick that can greatly boost readability.
You might have guessed it from the title: use a proportional font.
They are more readable.
That’s why we use them for literally everything else besides code.
But, I hear you cry, what about all my careful hand-crafted indentation? Fortunately very few languages need it. In fact, the trend is in the other direction: Go and Dart, for example, were both designed with 100% autoformatting in mind, and it works very well.
Compare:
Of course you will immediately notice that the fixed width version takes up more horizontal space. That’s rather what fixed width fonts do, isn’t it? If you’re into optimizing screen real estate, proportional fonts are clearly a win.
But that’s not what I’m talking about; I’m talking about readability.
What do you think?
So far today, 2023-11-04, feedback has been received 13 times. Of these, 12 were likely from bots, and 1 might have been from real people. Thank you, maybe-real people!
——— / \ i a | C a \ D n | irc \ / ———