4 ms·
Symbols are just other letters in the alphabet. Something like <‘_> is as natural for me to read at this point as any of the other words in this sentence. Math
by stouset 2y ago
Symbols are just other letters in the alphabet. Something like <‘_> is as natural for me to read at this point as any of the other words in this sentence.
Math is also symbol soup. But those symbols mean things and they’ve usually been designed to compose nicely. Mathematicians using symbols—just like writers using alphabets—are able to use those symbols to concisely and precisely convey complicated concepts to one another.
I guess my point is that symbols shouldn’t be looked at as inherently a positive or negative thing. Are they clear and unambiguous in their use? Do they map clearly onto coherent concepts? When you need to compose them, is it straightforward and obvious to do so?
- Etheryte 2y agoI think many programming languages could benefit if we had an easy way to have both custom symbols and a convenient way to input them without extra friction. Take APL for example, once you know the language it's incredibly expressive, but the overhead to typing it is so strong that many use custom keyboards/caps.
- ufo 2y agoI wish compose keys were more prevalent. There's something nice about typing -> and getting →
- bombela 2y agoTo be fair the basic ASCII keyboard is also default in US/Britain. And most people assume that's all they get. I have always used the "international" version of the US English keyboard on Linux. And I can enter all common symbols pressing altgr or altgr-shift. I also use right Ctrl as a compose key fore more. I would be hard pressed remembering what combo to press, after years it's just muscle memory. But how do you find out what layout and what compose key does what? Good luck. It's as documented as gesture and hidden menus on iOS and MacOS. sigh.
- jonahx 2y agoUiua (https://www.uiua.org/ https://www.uiua.org/), broadly in the APL lineage, solves this problem nicely. Like APL, it has a set of well-chosen symbols, but each symbol has an english name you can type just as you would a function name in another language, and it's automatically converted to the symbol when you run it.
- johnisgood 2y agoWell, I wish I could find the ones I have seen in the wild. Perhaps HRTBs and Fn traits, or double turbofish generics. I really cannot remember sadly.
- stouset 2y agoEven something like foo::<‘_, [T]>() is just not that hard to follow. Again, the symbols involved all compose nicely and are unambiguous. And frankly, you just don’t need something like that all that often (and when you do, there are usually other alternatives if you’re really put off by the symbols.
- johnisgood 2y agoSomeone mentioned the use of ")?)?" (in terms of error handling), I am quite put off by this, too. :P Anyways, I will try to look for the code, it is somewhere in my comment history but I have left way too many comments, so no promises.
- stouset 2y agoI would one million percent rather type (and read) foo(bar()?)? over something like if a, err := bar() { return nil, err } if b, err := foo() { return nil, err } But also even better is just let a = bar()?; let b = foo()?;
- deleted 2y ago[deleted]
- johnisgood 2y agoI prefer ("if a, err := bar() {"), the same things you said applies here, too. I write a lot of Go and I can glance through it quickly, there is no cognitive overhead for me. Edit: actually, it was someone else who said this: "Human brain has a funny way of learning how to turn off the noise and focus on what really matters.".
- jcelerier 2y ago> Math is also symbol soup. But those symbols mean things and they’ve usually been designed to compose nicely. Mathematicians using symbols—just like writers using alphabets—are able to use those symbols to concisely and precisely convey complicated concepts to one another. I just don't understand why one may take maths of all things as a positive example of something readable, when it's widely known to be utterly inscrutable to most humans on earth and even so many papers have differing conventions, using the same symbol for sometimes widely different or sometimes barely different things
- pharrington 2y agoLiterally every language is inscrutable to most humans on Earth. But they all work fairly well for those in the club that know them!