<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">Single value access syntax i.e., V =
M#{ 'a_key }, will not be a part of Maps. At least not in OTP
17.0.<br>
<br>
Implemented Maps functionality in OTP 17.0 will be described in
the reference manual and vill be a subset of what's described in
the EEP.<br>
Note "will be" .. currently not in master. =)<br>
<br>
Perhaps you are wondering, "why not?"<br>
<br>
Two issues,<br>
<br>
1) We don't really like the current syntax proposal,<br>
2) It is unclear if it is really needed, and if it is needed .. if
this is the way forward. I would prefer some sort of generic
lensing instead .. but we are getting way ahead of ourselves here.<br>
<br>
// Björn-Egil, Erlang/OTP<br>
<br>
On 2014-03-25 13:47, Pieter Bouwer wrote:<br>
</div>
<blockquote cite="mid:53317AD7.9080307@pharos-avantgard.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi,<br>
<br>
Sorry if this is a duplicate, but I couldn't find a bug report
dealing with this.<br>
<br>
In the EEP (43 - <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.erlang.org/eeps/eep-0043.html">http://www.erlang.org/eeps/eep-0043.html</a>)
for the map data type, syntax for accessing the value associated
with a key is suggested as, e.g. key 'a_key' in map M:<br>
<br>
<pre style="box-sizing: border-box; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; white-space: pre-wrap; display: block; padding: 9.5px; margin: 0px 0px 10px; line-height: 1.428571429; color: rgb(51, 51, 51); word-break: break-all; word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><code style="box-sizing: border-box; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; padding: 0px; color: inherit; white-space: pre-wrap; background-color: transparent; border-top-left-radius: 4px; border-top-right-radius: 4px; borde!
r-b
ottom-r
ight-radius: 4px; border-bottom-left-radius: 4px; border: 0px;">V = M#{ 'a_key' }.</code></pre>
<br>
However, if I try to do this (from the shell), I get a syntax
error:<br>
<br>
> M#{'a_key'}.<br>
* 1: syntax error before: '}'<br>
<br>
I don't know if this is still planned as part of the syntax - the
EEP was released in April last year.<br>
<br>
<pre class="moz-signature" cols="72">--
Regards,
Pieter Bouwer</pre>
<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>