<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 03/05/2012 11:50, José Valim wrote:
<blockquote
cite="mid:CAGnRm4Lryk9Gc4RspujgSEdZvkyJTBJAxj3Y6oYJfge713Kc1A@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">I don't
understand this example [p16]<br>
<br>
foo:bar(Ugh),<br>
<br>
How is this ambiguous? Are you trying to set the bar element
from the<br>
foo frame? Your next line is unclear.<br>
</blockquote>
<div><br>
</div>
<div>It is ambiguous because:</div>
<div><br>
</div>
<div> { foo:bar(Ugh) }</div>
<div><br>
</div>
<div>Could be a tuple with one element which is the result of
foo:bar(Ugh) or</div>
<div>a frame with key foo and value bar(Ugh) (according to your
proposal).</div>
<div>There is also the "ambiguity" in {}. Is it an empty frame
or an empty tuple?</div>
<div><br>
</div>
<div><{ foo: bar(Ugh) }> could work because there would be
no ambiguity for</div>
<div>the compiler, but it would be still ambiguous for humans
(damn you, humans).</div>
<div>I would shrug if I read a code like <{ foo:bar(Ugh)
}> that actually means</div>
<div><{ foo: bar(Ugh) }>.</div>
</div>
</blockquote>
<br>
I'm not sure that I would (shrug) at it - #{ foo->bar, baz->2
} seems much less ambiguous to me, and whilst I recognise that #{ 1
-> 2 } appears a bit odd, I would've thought that it's fairly
obvious what it's doing. There is no clash with module:function
syntax, no clash with #record_name{} syntax and no chance of
accidental matching taking place AFAICT. And as the author of erlson
mentioned, there is no real problem with trouncing erlson's #{...}
syntax as erlson users will immediately migrate to frames.<br>
</body>
</html>