3 ms·
I am happy for other people, even those I collaborate with, to set up their editor however they like. Ligatures aren't to my taste, but it's not really affectin
by thom 5y ago
I am happy for other people, even those I collaborate with, to set up their editor however they like. Ligatures aren't to my taste, but it's not really affecting me when I read the code and I'm not regularly pairing right now so whatever. Maybe someone's done a scholarly study to test editing and comprehension performance for fonts with and without, but I doubt the results would change my personal choices.
However, all that said, if you ever check in unicode identifiers that I can't easily type then you're on your own.
- dkjaudyeqooe 5y agoIt should be noted for clarity that unicode in code is orthogonal to this, which is display only.
- thom 5y agoNot quite, because in both cases the issue is "what the hell is that and how do I type it?"
- dkjaudyeqooe 5y agoIf I send you a file I edited with ligatures you can't see them, not true with a file with unicode-only chars.
- thom 5y agoYes, that was my original point. But my decision on whether to use a font with ligatures, or whether to allow unicode in program text, is still motivated by the same thing, so I’m not sure I’d say they were completely orthogonal concerns.
- vikingerik 5y agoI'll offer a possibly valid use case for Unicode identifiers: mathematical notation. C# allows Unicode for variable names, and I wrote some code using θ (theta) as a variable for a geometric angle. I really liked having a struct for cylindrical coordinates to name the values as (r, h, θ), which flowed quite well visually, better than writing out "theta" or "angle". And since it was a member of a struct, once I had the symbol in the editor once, the Intellisense code completion would just show the θ in the picker dropdown. (It was for a personal project and I'm not sure I'd do that in a team environment, but I'd at least ask the other developers if they'd like it. And of course one use of Unicode being good doesn't mean that all uses of Unicode are good.)
- thom 5y agoYes, this is the most common argument, but still, not in my back yard. I'm lucky enough to work with plenty of maths PhDs who don't insist on these shenanigans and still seem productive.
- WorldMaker 5y ago> However, all that said, if you ever check in unicode identifiers that I can't easily type then you're on your own. Between copy and paste and most language's auto-complete tools and the emoji soft-keyboards in most operating systems today you can "easily type" most any unicode identifier with just a little bit of knowing your tools. (The Windows emoji keyboard has almost all of the Unicode math symbols, for instance.)
- thom 5y agoSure, I get fuzzy search for emoji names in Emacs. Still not gonna do it in code.
- jgtrosh 5y agoIf you only know these Unicode input systems, I strongly recommend looking into https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key systems
- WorldMaker 5y agoI do have an AltGr international key that has many Compose Key benefits. It is handy. I tend to make the other recommendations first as people can be picky about changing their keyboard, and learning something like a Compose Key can be a lot of work for some people.