3 ms·
Possibly a better way to achieve a similar level of prettiness would be (ab)use of vim's conceal feature. Through its judicious use, the author can have "forall
by dendodge 3y ago
Possibly a better way to achieve a similar level of prettiness would be (ab)use of vim's conceal feature. Through its judicious use, the author can have "forall" appear to them as ∀, "alpha" as α, etc., without imposing these symbols on their colleagues.
- gleenn 3y agoAgree, there is definitely a trade-off, I certainly don't know how to input those characters quickly even if the author states it is faster in Vim and I am not a Vim newbie. Also, if you get a stacktrace in a log file, do they still print nicely? Do they still print nicely if I'm viewing that stacktrace on a build server's web interface? There are probably some number of utilities that this code is "viewed" by that don't correctly handle non-ascii unicode and the usability would suffer at the expense of the beauty/terseness. They do look pretty though.
- WJW 3y agoWell the article mentions Ctrl-k+FA to put in the ∀ symbol, but it should be fairly easy to make it output "forall" instead and then use the concealing feature to turn it into ∀. That would get you the best of both worlds, no?
- OkayPhysicist 3y agoHonestly, I would have had this concern ~10 years ago, but it's 2023. Unicode is ubiquitous, to the point that you'd need to pretty aggressively go out of your way to find things breaking due to it.
- cryptonector 3y agoRoboto Mono doesn't support all the math glyphs, even some of the ones TFA uses: https://news.ycombinator.com/item?id=36438765 https://news.ycombinator.com/item?id=36438765
- jcparkyn 3y agoIt's still much more annoying than it should be to input Unicode characters in most operating systems and text editors, though.
- bPspGiJT8Y 3y agoI agree, in Kitty I'd have to hit C-S-u and then type fora... to get ∀. Good thing I can just type forall and the formatter replaces the keyword with the symbol for me :) Same for transforming othey symbols, like :: and =>, <=, ->, <- into single characters.