I do think there’s an efficiency argument for making this more than just an extension: for OptionSets it doesn’t matter, but a Set has to do two hash lookups here instead of just one. Unfortunately, then it’s not backwards-deployable, so there is a trade-off. (And every new customization point increases code size for adopting types forever…)
6 Likes