[erlang-questions] literal character syntax
Wed May 14 16:10:34 CEST 2014
They are incredibly useful in pattern-matching simple string arguments. e.g.
case erlang:system_info(version) of
[$5, $., $1, $0 | _ ] -> ok;
_ -> fail
On Wed, May 14, 2014 at 4:28 AM, Vlad Dumitrescu <vladdu55@REDACTED> wrote:
> I would like to make a suggestion regarding the accepted literal
> characters syntax. At the moment, any character following a $ is accepted
> as itself. I find it very confusing when these characters are whitespace or
> control chars and my suggestion is to refuse these literals. Most of them
> have escaped representations and the others should be written as integers
> What do you think? Is anyone using these in a meaningful way?
> best regards,
> erlang-questions mailing list
Sean Cribbs <sean@REDACTED>
Basho Technologies, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions