4 ms·
Well, shell has the '-ne' operator, which is 'not equals' in a terser style. Really '!=' is just an attempt at rendering '≠' using only ASCII characters. They
by efaref 11y ago
Well, shell has the '-ne' operator, which is 'not equals' in a terser style.
Really '!=' is just an attempt at rendering '≠' using only ASCII characters. They're a bit like digraphs and trigraphs in C/C++, except everyone is used to them.
I wonder if Unicode is ubiquitous enough now that you could write a language where the real maths operators were used instead. What would that look like?
- Latty 11y agoScala allows using unicode arrows (→) in place of their ASCII version (->), but not things like '≠'. I'm currently using the Monoid font (https://larsenwork.com/monoid/ https://larsenwork.com/monoid/), which uses ligatures to achieve the visual effect of things like the not equals symbol, while the underlying code remains the same. It's a pretty nice work-around for current languages.
- yorwba 11y agoHaskell allows unicode in operators and there appear to be packages that implement aliases for the default ASCII versions. https://wiki.haskell.org/Unicode-symbols https://wiki.haskell.org/Unicode-symbols