[swift-evolution] [Discussion] Referencing the Objective-C selector of property getters and setters
brent at architechies.com
Wed Feb 24 23:50:23 CST 2016
> The #selector feature is very useful but does not yet cover all cases. Accessing poperty getter and setters requires to drop down to the string syntax and forgo type-safety. This proposal supports this special case without introducing new syntax, but by introducing new overloads to the #selector compiler expression.
What I don't understand is, what's the use case? When you want to access properties dynamically in Objective-C, you usually use key-value coding, not selectors. Can you point to APIs it would be helpful to use this with, or write some realistic code which uses this feature? Or is this basically just completeness for the sake of completeness?
More information about the swift-evolution