I can give my two cents on this debate, as I am a regular Julia user.

First, I understand the amount of complexity that this features requires and am 
fully aware of the possible confusion about operator precedence. However, this 
feature might win people that are skeptical about Nim, as whenever I showed my 
Julia codes to colleagues/students (I'm an astrophysicist), this is usually one 
of the things that impress them the most.

The reason why I am interested in having this feature in Nim too is because 
Julia is not the best fit for _all_ the situations where my group needs to 
develop code. Nim would be a very good option, but then either people say that 
Julia is «better» because of its support for mathematical notation and 
impressive speed (but producing standalone executables is complex) or that 
C++/Fortran is «better» because it is compiled and types are checked in advance 
(but it is not pretty to read, unless you just need plain algebraic operators).

> As soon as Unicode operators are supported people are going to start writing 
> their own/overloads and I expect it to result in an unreadable mess.

This is a risk I would not fear too much. As @Araq said, there are several ways 
one can write unreadable code… On the contrary, several Julia codes that 
implement mathematical equations look sooo clear to me that I am always annoyed 
by this whenever I have to go back to C++/Python/Fortran. Expressions like 
`1.0±0.1` 
([Measurements.jl](https://github.com/JuliaPhysics/Measurements.jl#examples)) 
and `vec1 × vec2` 
([LinearAlgebra](https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.cross))
 look so clear!

> typing it is awkward on standard keyboards, and likely requires copy paste

There are several solutions for this problem:

  1. As @hugogranstrom wrote, editor support for Julia lets users to digit the 
LaTeX equivalent of a symbol (e.g., `\pm`) and produce the corresponding symbol 
(`±`) with the TAB key. Recently, I discovered that the IPython REPL implements 
this too! Of course, this will require some work on editor plugins too.
  2. I use [Espanso](https://espanso.org/) to have all the mathematical/greek 
symbols available with only a few fingertips. (Here is my [configuration 
file](https://github.com/ziotom78/myconfig/blob/master/espanso/default.yml).)
  3. I am a Linux user and have a heavily customized [Xmodmap 
file](https://github.com/ziotom78/myconfig/blob/master/Xmodmap), which allows 
me to quickly type ·, ≤, ≥, etc. (Admittedly, this might be far harder for a 
Windows/Mac OS X user.) This is surely the hackiest solution, but it is by far 
the most efficient.


Reply via email to