[Pitch] Type Wrappers

Just to complete the loop; one fairly useful case for type wrappers is to allow for protocol wrapping in extensions. This allows for the potential of side stepping any composability issues. @hborla came up with quite honestly a pretty darned brilliant strategy to account for this where we could write a type wrapper as:

@SomeTypeWrapper
extension SomeProtocol where SomeAssociatedType: SomeConstraint { }

This allows the type wrapper to provide default implementations and would be very useful not just for the observability pitch but I am sure may other applications.

5 Likes