[erlang-questions] Maps single value access not implemented
Mon Feb 10 15:03:02 CET 2014
On 02/10/2014 01:54 PM, Sina Samavati wrote:
> Loïc Hoguin <> writes:
>> On 02/10/2014 01:10 PM, Sina Samavati wrote:
>>> I feel much better with that. I guess something in *EEP 43* made Maps complex,
>>> I mean, we don't really need all those capabilities for Maps as proposed in
>>> _EEP 43_. For example (this is just a friendly feedback not a *complaint*),
>>> I think the '=>' operator is enough for both adding a new key and updating an
>>> existing key.
>> The := operator is *very important*. It pretty much means "crash if my
>> code is messed up". This is essential.
> That's true from that perspective.
> From another perspective: add or update it, I don't want you to shout at me
> "Hey, there's no such key", because it will or will not be used. That's it.
There are some uses of maps where you don't care about whether the key
already exists. But in all the places where today you would use a record
incorrectly (over multiple modules/processes), the := is vital.
More information about the erlang-questions