4 ms·
My programming language doesn't want to use it; I do. If you would "never even think" to realize that ⇒ in your editor is actually =>, after having installed a
by blindmute 5y ago
My programming language doesn't want to use it; I do. If you would "never even think" to realize that ⇒ in your editor is actually =>, after having installed a programming ligature font where that is always advertised, that's on you. And any developer should already be well aware that no common language uses symbols beyond ASCII, so seeing ⇒ should be clear enough already that it's a ligature. I really think this 'confusion' argument is made up and has never actually occurred for more than 5 seconds.
Semantically, the language would like to use a ⇒, because it's representing the idea of an arrow. It's only due to keyboard constraints that it has use use =>. Parsers (and our brain is also a parser) would be much easier to implement if meaning didn't have to derive from symbol combinations like =>, !==, <!--. The input interface is limited to ascii to represent meaning, but our eyes don't need to be.
- thayne 5y ago> no common language uses symbols beyond ASCII, Ruby and scala allow using such characters, and there are libraries that use it. Julia actually has special characters in the standard library, although afaik they all have ascii aliases. The repl and many editor plugins support expanding tex style escapes to those special characters.
- lmm 5y ago> If you would "never even think" to realize that ⇒ in your editor is actually =>, after having installed a programming ligature font where that is always advertised, that's on you. Sounds like we agree that a font that does this should never be a default. I don't think customized environments to the extent that one developer sees a different view of the code from another are a good idea (partly because I think reviewing and pair-programming are very valuable), but I guess if you want to set up something like that it's fine as long as you're not pushing it on anyone else. > And any developer should already be well aware that no common language uses symbols beyond ASCII, so seeing ⇒ should be clear enough already that it's a ligature. I've been using ⇒ in Scala for over a decade, shrug.
- blindmute 5y agoI agree it should not be a default. I think much like using the keyboard to navigate the IDE, it's something you can do that brings a benefit once you're familiar with the basics. I don't think vim should be the default terminal editor for the same reason, but I still think vim is worthwhile to use.