<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 2014-07-01 16:26, Knut Nesheim
wrote:<br>
</div>
<blockquote
cite="mid:CACSRAtXruPUezdFUoUbVP0JbxsWOzXDH9gLrYHLSmCrjj_s_EA@mail.gmail.com"
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>
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
cite="mid:CACSRAtXruPUezdFUoUbVP0JbxsWOzXDH9gLrYHLSmCrjj_s_EA@mail.gmail.com"
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
cite="mid:CACSRAtXruPUezdFUoUbVP0JbxsWOzXDH9gLrYHLSmCrjj_s_EA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Regards</div>
<div>Knut</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-bugs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-bugs">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
<br>
</body>
</html>