[erlang-questions] correct terminology for referring to strings
Richard O'Keefe
ok@REDACTED
Fri Aug 3 00:19:43 CEST 2012
On 3/08/2012, at 12:05 AM, Thomas Lindgren wrote:
>
> Another approach might be to use a heuristic tool a la xref to detect "suspicious" string literals. Not sure if that helps.
Now _that_ is possible and could well be helpful.
For that matter, I invite you to consider this example in pure ASCII:
1> c(snark).
{ok,snark}
where in the shell
m% cat snark.erl
-module(snark).
-export([f/0]).
f() -> [ '', '', '', '', '', '', '', '' ].
but in my text editor,
f() -> [ '^@', '^A', '^B', '^C', '^D', '^E', '^F', '^G' ].
It would probably be a Good Thing if Erlang gave at least a warning
about control characters in atom, string, or character literals
written without using \ .
I'd write this up as an EEP if EEPS didn't have to be in Markdown these days.
More information about the erlang-questions
mailing list