Re: Parser bug: if missing ", " in list between records, the first is ignored, and no parser warnings are given.
Robert Virding <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAH_GQaPYzMXFAsXq=bYnmuhORYf=RNsAAPLByLL-+uRyW5jotw@mail.gmail.com> |
The obvious solution is to reinstate the need to wrap the "thing" before the # with parentheses when it is and expression. Then the problem would go away. :-) Robert On 16 November 2014 22:12, PAILLEAU Eric <[email protected]> wrote: > Le 16/11/2014 21:54, Roland Karlsson a écrit : > >> >> Concatenating of two strings is an exception I assume. >> I am not knowledgeable enough in Erlang syntax to explain why it works. >> Need help of someone else. >> > > It is written in documentation. > > "Two adjacent string literals are concatenated into one. This is done at > compile-time and does not incur any runtime overhead" > > I don't fight for this syntax, I think it add more inconsistency in syntax. > > By the way, this syntax only work at first expansion , > this below module will never compile ... > > ---8<--------------------------------------- > -module(test). > > -export([main/0]). > > -record(test,{a=0, b=0}). > > main() -> left()right(). > > left() -> #test{2}. > > right() -> #test{a=6}. > ---8<--------------------------------------- > > > "You are misunderstanding the record and tuple syntax." > > Not at all . > > Documentation says "However, record is not a true data type. Instead > record expressions are translated to tuple expressions during compilation. " > > Records are not existing in Erlang , only in syntax. > > my last mail on this. > Anyway, I will never use this syntax. > > > > > > _______________________________________________ > erlang-bugs mailing list > [email protected] > http://erlang.org/mailman/listinfo/erlang-bugs > _______________________________________________ erlang-bugs mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-bugs