[erlang-questions] unicode in string literals
Richard Carlsson
carlsson.richard@REDACTED
Tue Jul 31 09:39:55 CEST 2012
On 07/31/2012 12:57 AM, Richard O'Keefe wrote:
>
> On 31/07/2012, at 3:17 AM, Richard Carlsson wrote:
>> 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.)
>
> Some Prolog systems do (the tokeniser in my book offered it, IIRC).
> One of the people on the Prolog standard mailing list has been
> jumping up and down in anger because SWI Prolog has it. But when you
> have characters like 0'x, 0'y, 0' , it's really nice to have 0\s.
> (Don't laugh. Erlang's $x, $y, $ , is just as bad.)
Yes, I think it was some horrible occurrences of $ , in erl_scan that
originally got me to suggest that \s should be added to Erlang, around
the time when Barklund was working on the draft Standard.
> I actually have a keystroke in my emacs-ish editor to remove
> trailing spaces because their presence breaks things more often than
> it helps.
I wasn't terribly clear - what I meant was leading or trailing spaces
within strings, as in "Hello ". It's always slightly worrying that
someone might not see that they just removed something important.
/Richard
More information about the erlang-questions
mailing list