4 ms·
If compilers supported proper unicode as code not just in strings (like, I believe, Go does) then you could use A ⊗ B for outer products and A ⋅ B for inner pro
by tehwalrus 14y ago
If compilers supported proper unicode as code not just in strings (like, I believe, Go does) then you could use A ⊗ B for outer products and A ⋅ B for inner products.
(a quick google implies that Haskell supports this (http://www.haskell.org/haskellwiki/Unicode-symbols http://www.haskell.org/haskellwiki/Unicode-symbols). Good!)
- mercurial 14y agoYou mean, Unicode symbols. Quite a few languages, including Java, support Unicode letters as identifiers. But frankly, I'd rather stay with cryptic :+: (see the answer to this question [1] for why) 1: http://stackoverflow.com/questions/2793792/is-it-a-good-idea-to-use-unicode-symbols-as-java-identifiers http://stackoverflow.com/questions/2793792/is-it-a-good-idea...
- tehwalrus 14y agoGo has unicode symbols, but I meant just for operators. The reasons listed are important some of the time, but for example when you're a bunch of Chinese developers working on a project it seems sensible to use chinese identifiers in the code (especially if you all only have basic english.) In this situation, everyone is going to have a computer set up to use the character set, so the ����� + ��� situation shouldn't arise. In terms of confusing things at linking / runtime stage, I didn't think of that - maybe you're right! Go gets away with it by being completely compiled down to binary (and requiring the source of all the libraries locally, IIRC.)
- mercurial 14y agoAs a non-native English speaker, I can tell you it's a very bad idea to mix up a language with English keywords but identifiers in a different language. The disconnect between the two is awfully annoying, and the "native language identifiers" end up being a mix of English and native language anyway (I don't know how it is with Chinese but many language don't have useful equivalents to many IT terms, or they are so terrible that nobody wants to use them).
- tehwalrus 14y agoIndeed - I can imagine, with so many english keywords everywhere. The code I've seen from developers who speak other languages tends to be in english, with comments in their language - frequent use of google translate to understand what's going on! :)