Currently, Set::remove*() returns a boolean indicating whether the element(s) being removed were found. We need a variant of this operation that throws if the element is not found.
I'd prefer to rename the existing operations to discard*() and change remove*() into the strict variants. This matches Python's set type and some others, however this is a BC break with very little justification. So failing that we need to come up with a good name and I tend to dislike things like removeStrict()... what's it being strict about? Further to that 'strict' already has a pretty specific meaning in set theory.
Currently,
Set::remove*()
returns a boolean indicating whether the element(s) being removed were found. We need a variant of this operation that throws if the element is not found.I'd prefer to rename the existing operations to
discard*()
and changeremove*()
into the strict variants. This matches Python's set type and some others, however this is a BC break with very little justification. So failing that we need to come up with a good name and I tend to dislike things likeremoveStrict()
... what's it being strict about? Further to that 'strict' already has a pretty specific meaning in set theory.