4 ms·
Unpopular opinion, Monospace fonts are slower to read. Since I mostly code in camelCase, and I don't like it, I modified this proportional font with some paddi
by efortis 2y ago
Unpopular opinion, Monospace fonts are slower to read.
Since I mostly code in camelCase, and I don't like it, I modified this proportional font with some padding before capital letters and made the space char much longer
https://github.com/ericfortis/verdanacamel https://github.com/ericfortis/verdanacamel
The caveat is that it doesn’t tabular align lines, but I think that’s something IDEs should render for us.
- simondotau 2y agoProgramming in variable spaced fonts is weird but understandable. Programming in a font which actively lies to you about the presence or absence of spaces is batshit crazy. I agree with you about tabular alignment though. I do think it's stupid that "readable" code involves emulating desktop publishing metaphors with arbitrary numbers of spaces.
- efortis 2y agoIt is not lying, it’s not creating a space, it is padding capital letters. After a few hours they are not confusing. At any rate, that’s a workaround for camel casing.
- simondotau 2y agoShowing space (calling it padding is just semantics) where a space doesn't exist is the font lying to you.
- crazygringo 2y ago> Monospace fonts are slower to read Based on what? I don't think reading speed has ever been the limiting factor for me when reading code. My comprehension is always much slower. On the other hand, monospace fonts are vastly clearer. Exact punctuation is easier to see. And, obviously, you can align things however you want.
- efortis 2y agoFor the most part the speed gain of that font comes from the left padding on the capitals. But proportional fonts are faster to read allegedly because of the shape words forms. At any rate, before seeing that study I was anecdotally convinced. Although speed is not a limiting factor, the little extra effort it takes to read monospace is taxing. In other words, not having to focus on the words with more deliberation helps on long days. For the clarity, I also modified some punctuation glyphs. For instance, the ‘!’ is larger. And tabular alignment is something IDE could make for us. There are some DSLs that have tables, IntelliJ has them.
- efortis 2y agoI can’t explain why they are faster but I can demonstrate it. I think the best example is putting two man pages with different fonts side by side.
- crazygringo 2y agoOh I totally agree that reading body text is faster with a proportional font! I don't think many people would dispute that. But with code specifically, it seems harder to see the exact punctuation. You're not scanning word shapes, you have to pay attention to individual symbols. I shudder to think of a RegEx in a proportional font, where a period barely has width. Or how do you deal with a single quote followed by a double quote? Or two single quotes? Or zero vs oh?
- rererereferred 2y agoI don't like the spaces inside the camelCase but I do think spacing should be something IDEs fix for you, say for example a project uses 2 space indentation and you like 4, the IDE should be able to render virtual spaces without source changes. Same for multiline strings, it should be able to render the whole block aligned to the start of the string without extra padding in the other lines.
- xigoi 2y agoI find proportional fonts terrible for coding because they make subtle differences in punctuation hard to see, suh as " versus '' or … versus ... .
- seanmcdirmid 2y agoIt doesn’t turn out to be problem in progress. Even having I and l look the same isn’t something that I ever need to think about.
- efortis 2y agoI l | 1 I once had trouble with a variable named ‘l’ because I thought it was a pipe (bitwise or in js)
- seanmcdirmid 2y agoI just tried it out, but then I realized (a) I never use capital I as a standalone variable name...and I never used it period. i will always be an integer anyways. Since coding standards enforce nice variable names and forbid ascii spacing art, ya, it never comes up.
- efortis 2y agoLigatures are not particular to proportional fonts. For example, Hasklig has a few handy ones.