3 ms·
The ability to use Greek letters and Unicode symbols in Julia is delightful, because it helps the math in the code to look more like math, and makes the code in
by leephillips 6y ago
The ability to use Greek letters and Unicode symbols in Julia is delightful, because it helps the math in the code to look more like math, and makes the code in general more succinct. It’s optional, but seems to be popular. And Julia is not alone here, but the culture around it has embraced it.
- yellowapple 6y agoOn this note, Perl 6 (or Raku nowadays, I guess) takes IMO the best approach here (and if Julia doesn't already take this approach, it probably should): allowing both fancy Unicode symbols for those who prefer them and equivalent representations in ASCII (a.k.a. "Texas") for those who don't want to have to switch keyboard encodings or look up symbols to copy/paste or setup editor macros just to write code.
- leephillips 6y agoTeX commands are built in to the Julia REPL. Just type \alpha<TAB> and an α appears.
- lizmat 6y agoRe "(a.k.a. "Texas")", that meme has been removed from the documentation. It's now just ASCII vs Unicode: https://docs.raku.org/language/unicode_ascii https://docs.raku.org/language/unicode_ascii
- yellowapple 6y agoLame. Ah well.
- bradrn 6y agoHaskell allows this as well. ASCII symbols are the default, while you can use the -XUnicodeSyntax language extension to get Unicode symbols. (My understanding is that Unicode characters are always allowed in identifiers.)