[erlang-questions] unicode in string literals

Richard Carlsson <>
Mon Jul 30 17:17:51 CEST 2012


On 07/30/2012 04:42 PM, Joe Armstrong wrote:
>       Should the pre-processor make a rude noise and only accept latin1
> printable characters?

Maybe. Personally, I've never liked non-printing characters or 
whitespace other than plain spaces in strings; if you write a program 
that should output e.g. a tab as part of a string, and you use ^I in the 
source code instead of \t, how can you stay sure that the editor hasn't 
at some point changed it to a space, in particular with many different 
people working on the code? Even leading or trailing spaces are prone to 
being edited out by mistake. (Erlang supports the \s escape as a synonym 
for space, for example $\s, but I don't know any other language that has 
this pretty obvious feature.)

     /Richard




More information about the erlang-questions mailing list