> 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* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D -- 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/CAGnRm4%2BiBiTf8R3GVWWKBaY3eZEnt44-o9ea8g_ueST8SeFhQw%40mail.gmail.com.