Hacker News new | ask | show | jobs
by sidpatil 1872 days ago
Julia lets you use all sorts of Unicode characters as variable names and even as operators. It works quite well in the REPL, since it supports a TeX-like input method for Unicode characters. It's probably my favorite feature in the language, since it makes the code much more concise and expressive. (I've always hated having to step down from the mathematical beauty of LaTeX-typeset equations into the ugly reality of spelled-out Greek-letter names in a codebase that didn't support Unicode.)

However, input method support in editors isn't as straightforward, which can become a limiting factor if you have to work on a Julia codebase that uses Unicode characters and your editor doesn't make it easy to insert those characters.

1 comments

The problem with Julia is it only supports what Unicode supports directly. Which means you cannot have x,y,z as subscript for coordinate variables because Unicode, for some weird reason, does not have the full alphabet in subscript or superscript form. Also, when I first dived into Julia I found quite a few Unicode symbols that, when used as function names, lead to all kinds of weird compiler errors. Kind of defeats the purpose.

A language hoping to make this complete would have to do special formatting that allow super- and subscripting any Unicode symbol. But that won't work in a normal terminal...