In Swift 5.2 we get property wrapper composition - and it’s really great.
Currently if I want to access the nested storage of two composed wrappers:
@C @B var a: A
Then I need to do something like
_a.wrappedValue
I seem to remember a suggestion to do __a
for this, but I don’t know where I saw it - it doesn’t appear to be from the proposal.
Would it make sense to synthesize a getter:
var __a: B<A> { _a.wrappedValue }
as well as a projection (if relevant):
var $$a: P<A> { _a.projectedValue }
(Where P is the type of the projection in the B property wrapper)