Provide a drop-in replacement for UniqueRepresentation, that only provides equality. #39070
Description
Problem Description
As pointed out by @nbruin many times, in particular in #25388 (comment), and as witnessed in #38904, there are drawbacks to using UniqueRepresentation
. At the very least it makes parent creation more expensive.
Proposed Solution
We provide a drop in replacement for UniqueRepresentation
, that saves us from re-implementing equality.
For example, Partitions
is a class that currently inherits from UniqueRepresentation
. However, it is completely unclear for which applications this may be beneficial.
Alternatives Considered
Alternatively, we could just implement equality of the parents case by case. This might be still better performance-wise, but would be much more work. Additionally, it may be helpful to state almost explicitly, by inheriting from the proposed class, that we do not wish to use UniqueRepresentation
.
Additional Information
No response
Is there an existing issue for this?
- I have searched the existing issues for a bug report that matches the one I want to file, without success.