[swift-evolution] [Accepted] SE-0064: Referencing the Objective-C selector of property getters and setters

Robert Schwalbe roberts at inode.com
Sat Apr 16 13:20:57 CDT 2016


I realize I am quite late to this discussion, so if a public flogging is in order I am willing to accept that (and the rest of this e-mail can be ignored and/or deleted from the archives).

Per my reading of SE-0022, would SE-0064 institute the first exception to the #selector expression where the expression is not a reference to a method?

In the spirit of taking my lumps for not speaking up when asked to do so, was there any discussion that considered:

    let firstNameGetter = #selector(get: Person.firstName)
    let firstNameSetter = #selector(set: Person.firstName)

in lieu of the accepted:

    let firstNameGetter = #selector(getter: Person.firstName)
    let firstNameSetter = #selector(setter: Person.firstName)

My concern would be a growing list of permitted non method name parameters to the #selector expression.



More information about the swift-evolution mailing list