Hello again, Swift Evolution!
Here is a list of changes to the design in this revision:
- The distinction between property wrappers that are API and property wrappers that are implementation detail is formalized via the
apioption in the
- Implementation-detail property wrappers on parameters are sugar for a local wrapped variable.
- API-level property wrappers on parameters use caller-side application of the property wrapper. The design of API-level property wrappers attached to parameters is the same as the previous revision of SE-0293.
- Overload resolution for property wrapper initializers will always be done at the property wrapper declaration.
We believe this addresses the feedback about protocol requirements, because implementation detail property wrappers are not part of the function signature and therefore can be used on protocol witnesses without the requirement including the property wrapper. We have also included a future direction for the previously pitched property wrappers in protocol requirements for API-level property wrappers.
Both of us think there's a better spelling for
api out there, but we need your help with brainstorming! A few other ideas that Filip came up with were
apiSignificant. Please let us know what you think or if you have other ideas - now is the time for bike shedding! Of course, any other feedback is also welcome.