[erlang-questions] atoms with newlines

Hynek Vychodil vychodil.hynek@REDACTED
Wed Feb 26 10:29:25 CET 2014


I fully agree with Richard. Backslash is escape character and it should
escape next character so this newline should be omitted. It is definitely
bug and unexpected behavior.

With best regards
   Hynek Vychodil


On Tue, Feb 18, 2014 at 11:57 PM, Richard A. O'Keefe <ok@REDACTED>wrote:

>
> On 19/02/2014, at 10:33 AM, Vlad Dumitrescu wrote:
> > Eshell V5.10.4  (abort with ^G)
> > 1> 'foo\n\
> > 1> bar'.
> > 'foo\n\nbar'
> >
> > I had expected that <backslash><newline> would
> > - be rejected as a syntax error, or
> > - be discarded like in C and Prolog.
> >
> > I did _not_ expect it to turn into <newline>.
> >
> >
> > Actually, what I was referring to was that that last backslash isn't
> really needed at all.
>
> No, the last backslash IS needed because I *don't* want
> the newline.  In ISO Prolog I can write
>         |p('foo\|
>         |bar\|
>         |zoo').'|
> where the vertical bars show record boundaries,
> and get the same effect as
>         |p('foobarzoo').|
>
> You are concerned about atoms that include newline characters.
> I am concerned about atoms that for one reason or another
> need to be split over lines WITHOUT introducing newline characters.
>
> I just want \<newline> to work sensibly and to be so documented.
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140226/fc82da1a/attachment.htm>


More information about the erlang-questions mailing list