I see. So, basically, we move the decision whether to do the
wrapping/unwrapping or not to the call site.
This has a number of drawbacks:
This a much more invasive change. It means we have to find every place where
we use merge and make a decision. What if we miss one? Or forget about it
and use the wrong function when making a change in the future?
Also, what about generic functions that are built on merge but also require,
say, commute or, let's say, displayPatch? Should they now all come in two
varieties? Or do we also define instances of all these classes for
AllowDuplicates?
Considering these costs, what exactly are the benefits?
|