Christoph Thiede wrote
What do you think, should we copy this into the Trunk?
Personally, I'd get good use out of at:ifPresentPut: and at:ifPresentPut:ifAbsentPut:.
I seriously considered adding them as extensions in a couple of projects.
Christoph Thiede wrote
Also, I'm not sure about the order of arguments.
The pattern other selectors in Squeak follow is present first, absent second.
We should probably keep to that pattern.
Tobias Pape wrote
I find it a bit too specific for trunk.
It's quite an edge case...
FWIW I encountered this case quite a few times over the years.
It's essentially always a concern when storing and updating value objects in dictionaries.
Levente Uzonyi wrote
If wanted to have a special method for that case, I would try to look up the key only once.
+1

Stephan

Sent from the Squeak - Dev mailing list archive at Nabble.com.