[erlang-questions] A proposal for Unicode variable and atom names in Erlang.

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Mon Oct 22 13:33:35 CEST 2012


On Oct 22, 2012, at 11:24 AM, HH Veldstra <hasan.veldstra@REDACTED> wrote:

> +1. Outwith very specific circumstances allowing non-English code is
> dumb if for no other reason that it will drastically reduce the pool
> of programmers that can be hired to work on your system.

Not all unicode symbols are meant to be for foreign languages. There are some symbols which would be nice
to use in your programs. Some of the more mathematical code tend to use lots of greek symbols for instance. If you can name your variable with the right symbol, it becomes more readable since it is closer to what the paper writes.

But to be really powerful you need ways to infix operators as well, so you can write ⊕ for 'xor' and so on.

I agree fully with the premise that this is also a question of readability  of programs. You *could* pick random characters as variable names. The compiler would understand it, but the readability would be hampered. To me, writing chinese symbols would yield the same level of obfuscation. With a larger alphabet comes great responsibility.

Jesper Louis Andersen
  Erlang Solutions Ltd., Copenhagen






More information about the erlang-questions mailing list