> 1. put_new and put_new! pair behaves differently from !-paired functions,
I’m not sure if it’s good thing to break expectations in that case.
I believe the concern here is that while all functions raise when the key does not exist, the proposed put_new! raises when the key exists. It is how put_new! should behave... but it is a different behaviour than the one that already exists, highlighted by the fact a new exception would have to be added.
Ben commented on the second point already.
Also, your proposal does not include any code examples or snippets on how this pattern would be used. I personally can't recall a need for put_new!, especially because *the best use of "static maps" is by defining all keys upfront and then updating/replacing them*.
José Valim
Skype: jv.ptec
Founder and Director of R&D