Hello,

presently there is no function that throws an error in case we want to put 
a really new key in a map.

The function Map.put_new only does nothing if the key is already there.

The idea for Map.put_new! is to throw an error if the key is there. The use 
case is the developer who wants to be sure that the key is not there, as 
otherwise it means there is an error in the application code. As such, an 
exception should be raised.

Is this a useful addition to Map?

Thanks
Mário

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/b7ac0a50-556b-422d-af05-da0aa50ecf38%40googlegroups.com.

Reply via email to