💾 Archived View for circadian.gemlog.org › 2023-05-09-proportional-coding.gmi captured on 2023-06-16 at 16:21:54. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-06-14)
➡️ Next capture (2023-07-10)
-=-=-=-=-=-=-
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-06-16, feedback has been received 111 times. Of these, 102 were likely from bots, and 9 might have been from real people. Thank you, maybe-real people!
——— / \ i a | C a \ D n | irc \ / ———