Unicode based programming language

Viewed 4192

This is a curiosity more than anything: Does there exist a programming language that allows variables, functions, and classes to be named using using Unicode rather than ASCII (except, of course, for special characters such as '+')? Do any popular languages have support for this?

Also, related to this, if any common language supports Unicode, then is there any way to convert an existing API into a language of the user's own choice? It seems like it would be helpful to give a programmer the ability to learn an API in their own language. I imagine downloading a standard API (for instance boost) and then downloading the standard translation mapping and then being able to program in my native language.

13 Answers

Perl and Go both allow full Unicode identifiers. Perl requires a use utf8; declaration, but Go does this automatically.

See UAX#31: Unicode Identifier and Pattern Syntax, for various concerns.

In general, an identifier should match the pattern ^\p{ID_Start}\p{ID_Continue}*$, although languages are free to add to that. For example, Java adds the currency symbols (\p{Sc}), including $.

Related