<div dir="ltr">FWIW, I don't see the automatic maps merge behaviour being useful to justify itself or even the possible confusion it may cause.</div><div class="gmail_extra"><br clear="all"><div><div><br></div><div><br>
</div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div>
<span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></div></div>
<br><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 4:42 PM, Björn-Egil Dahlberg <span dir="ltr"><<a href="mailto:egil@erlang.org" target="_blank">egil@erlang.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
<div>On 2014-07-01 16:26, Knut Nesheim
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I was recently bitten by a combination of my own mistakes
and a unexpected syntax with maps. I'm not sure if this is a
bug or intended behaviour.</div>
<div><br>
</div>
<div>
<div>1> #{foo => bar, foo => quux}. </div>
<div>#{foo => quux}</div>
</div>
<div>2> #{foo => bar} #{foo => quux}.<br>
</div>
<div>
<div>#{foo => quux}</div>
</div>
<div><br>
</div>
<div>In the second case, two maps are merged due to missing a
separating comma between them. I would expect it to fail with
a syntax error.</div>
</div>
</blockquote>
<br></div></div>
It is the same behaviour as for records:<br>
<br>
3> rr(t).<br>
[rec]<br>
4> [#rec{foo=bar} #rec{foo=baz}].<br>
[#rec{foo = baz}]<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Is this intended behaviour?</div>
</div>
</blockquote>
<br>
The similarity with records is intentional .. but I agree that this
behaviour should be revisited. I'm not convinced of it usefulness.<br>
<br>
Thank you for your feedback!<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Regards</div>
<div>Knut</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
erlang-bugs mailing list
<a href="mailto:erlang-bugs@erlang.org" target="_blank">erlang-bugs@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
<br></blockquote></div><br></div>