Which is the difference between @propertyWrapper
and @propertyDelegate
?
In all WWDC19 videos they talk about @propertyWrapper
, however all actual implementation use @propertyDelegate
(i.e SwiftUI - State); the compiler on Xcode 11 Beta
seems to accept both and ask for the exact same requirement:
@propertyDelegate struct A {
}
// Property delegate type 'A' does not contain a non-static property named 'value'
@propertyWrapper struct A {
}
// Property delegate type 'A' does not contain a non-static property named 'value'
Note that in both cases the compiler says "Property delegate".
Am I missing something or this is because they didn't decide yet which name to use?