Property wrapper requirements in protocols

Unfortunately, I've decided not to proceed with this proposal, for two reasons:

  1. The use cases I've been able to find are fairly limited, and the recent introduction of macros largely subsumes the desired functionality; there's not enough motivation to justify the inclusion of this feature in the language at this point.
  2. My own use case (which has evolved over time) wouldn't be able to benefit from this feature unless the proposal also provided for specifying property wrappers (whether in a protocol or not) using generic type parameters (e.g. something along the lines of final class C<T: MyWrapperProtocol> { @T var x: Int }). I made an initial attempt to define such an addition, but it started getting very complex to specify appropriate semantics in the presence of features like generic parameter packs.

This having been said, if someone who has more time on their hands than I do these days figures out a way to address these concerns and suggests the necessary revisions to the proposal, I'm open to revisiting it.

4 Likes