[webkit-dev] Terminology for giving up ownership: take, release, move
achristensen at apple.com
Tue Sep 6 11:36:22 PDT 2016
I think “take" is a fine word to indicate that you are taking a value from a HashSet, just like “add" indicates you are adding to the set and remove indicates you are “removing" from the set. It’s true that in all these cases the caller is doing the thing, not the object, but it makes sense in my mind. An alternative would be to change set.add(value) to a static function HashSet::add(set, value), set.remove(value) to HashSet::remove(set, value), and set.take(value) to HashSet::take(set, value), etc.
More information about the webkit-dev