[erlang-questions] literal character syntax
Sean Cribbs
sean@REDACTED
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
end
On Wed, May 14, 2014 at 4:28 AM, Vlad Dumitrescu <vladdu55@REDACTED> wrote:
> Hi!
>
> 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
> anyway.
>
> What do you think? Is anyone using these in a meaningful way?
>
> best regards,
> Vlad
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
--
Sean Cribbs <sean@REDACTED>
Software Engineer
Basho Technologies, Inc.
http://basho.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140514/9a863e50/attachment.htm>
More information about the erlang-questions
mailing list