Unicode identifiers in OCaml


Using Unicode identifiers would improve the clarity of programs, in particular for teaching purposes.

According to Xavier Leroy, it would not be too difficult to add support for Unicode identifiers in OCaml. The easiest way would be to reuse Java's specifications regarding the definition of uppercase letters, lowercase letters, etc. The two questions that Java's specifications do not answer are

Java specifications : Spec page, Character.isJavaIdentifierPart

The questions

  1. Which characters should be considered symbols and accepted for infix identifiers ?
  2. What should be the relative priority of each identifier ?

Express yourselves here

Current precedence and associativity of OCaml infix identifiers are specified by their beginning symbols, as specified in the manual.

We could :

  1. conservatively keep the rules as they are now;
  2. conservatively keep the rules as they are now and use a Camlp4 extension (preferably bundled with the compiler) to allow the definition of infixes with given precedence/associativity rules (vote: 1);
  3. add some more symbols, specifying new precedence/associativity rules;
  4. use completely different rules.