[erlang-questions] Accessing a single value from MAPS

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Thu Oct 8 13:26:11 CEST 2015


On Wed, Oct 7, 2015 at 8:54 PM, Ivan Carmenates Garcia <co7eb@REDACTED>
wrote:

> Map.id, … would be nice!! instead of {id:= Id} = Map.


The problem with using '.' here is that it is already taken for the
'end-of-expression' token. So the grammar becomes inconsistent if you use
it for this purpose. You would have to pick some other signifier. You would
have, e.g., Map#{id} be valid syntax meaning the value that is under 'id'
(I think, the grammar might have trouble here as well).


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151008/581aa629/attachment.htm>


More information about the erlang-questions mailing list