Avoiding existentials for a known set of types in Embedded Swift

I think the difference is, that with the enum approach all cases are statically known. If you use any this is not the case because the conformer could come from an unknown consumer of your module.

A future direction might be to annotate protocols in a way that they are "sealed", so that only you can conform to them in your module.

1 Like