[erlang-questions] Accessing a single value from MAPS

Richard Carlsson carlsson.richard@REDACTED
Thu Oct 8 20:57:08 CEST 2015

On Thu, Oct 8, 2015 at 4:41 PM, Fred Hebert <mononcqc@REDACTED> wrote:

> On 10/08, Richard Carlsson wrote:
>> Not quite. The end-of-form (or 'dot') token requires that the period
>> character is followed by whitespace, a comment, or end-of-file. Otherwise
>> it's a '.' token, as is already in use in expressions like
>> Record#recordname.fieldname.
> Am I right in assuming mnesmosyne was like records currently are and
> packages were -- mostly using atoms as fields?
> There's an interesting distinction for maps in that any data structure·
> whatsoever might be a key, even tuples:

Yes, only atoms were allowed as field selectors back then. I think a
general operator <Expr> '.' <Expr> would be possible, but it might lead to
horrible code, as you point out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151008/7cc607ae/attachment.htm>

More information about the erlang-questions mailing list