MarcWeber/vim-addon-manager — comment on commit 4f561ffc8ebdf1b34d7f22cbede7b3b15361c484
File:  line 0
By ZyX-I:

> And it is debuggable if it ever happens. A simple grep for the key is enough.

You don’t understand such kind of bugs. Pretend there is a code that checks dictionary for being empty and behaves differently depending on this. What should you grep?

> sort, filter, .. they all change in place. So tell me why I should do it
differently.

The fact that vim is doing wrong things does not says you should do the same. `grep` and `map` in perl, `filter` and `map` in python all return a new object. In-place map and filter can be used for performance reasons, but it is not an issue here.

I don’t think it is likely to happen in this case too, but when there is a choice “to copy or not to copy” dictionary I will always do the first. There is not a single reason why we do want to add a new key to existing dictionary.