[erlang-bugs] Parser bug: if missing ", " in list between records, the first is ignored, and no parser warnings are given.

Robert Virding rvirding@REDACTED
Mon Nov 17 16:56:51 CET 2014


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 <eric.pailleau@REDACTED> 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
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20141117/637a4dce/attachment.htm>


More information about the erlang-bugs mailing list