3 ms·
How does that give you the unicode character you need in the output? Or are you saying there is just never a reason to have those in strings?
by detaro 5y ago
How does that give you the unicode character you need in the output? Or are you saying there is just never a reason to have those in strings?
- leephillips 5y agoIf your computer is set up properly you just type <mod>-> to get →.
- mananaysiempre 5y agoUnfortunately, there’s a small amount of relatively common things you might want in literals that can be very confusing in monospace display: tabs, of course, but also all the other spaces (en, em, hair, etc., legitimately needed if you want your typography to be up to 18th-century standards and not argue about the “single vs double space” typewriter-age nonsense), hyphens and dashes and minuses (aka “why I’m still using -- and --- in my TeX code”), and so on.
- avgcorrection 5y agoI do use dashes and real (not pseudo-quotes, i.e. `"` and `'`) quotes in code comments but I only use the space symbol for whitespace.
- leephillips 5y agoI use the proper dashes, too, in prose (but when using TeX I use Unicode input these days). But even though some programming languages (such as Julia) would allow one to use the different dashes for different purposes, I don’t think that would be a good idea: they look too similar in, as you say, in monospace fonts.