<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Wouldn't it be:</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">#selector(getter: NSString.lowercaseString))</span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">To allow us to disambiguate getters and setters?</span></font></div></div><div><br>On 15 Mar 2016, at 06:09, Keith Smiley <<a href="mailto:keithbsmiley@gmail.com">keithbsmiley@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>Another reasonable use case for this is with `UILocalizedIndexedCollation`. For example with Swift 2.1:</span><br><span></span><br><span>```</span><br><span>let collation = UILocalizedIndexedCollation.currentCollation()</span><br><span>collation.sectionForObject("something", collationStringSelector: "lowercaseString") // NSString.lowercaseString</span><br><span>```</span><br><span></span><br><span>Currently the Xcode quickfix is:</span><br><span></span><br><span>```</span><br><span>collation.sectionForObject("something", collationStringSelector: Selector("lowercaseString"))</span><br><span>```</span><br><span></span><br><span>But I guess ideally this would work something like:</span><br><span></span><br><span>```</span><br><span>collation.sectionForObject("something", collationStringSelector: #selector(NSString.lowercaseString))</span><br><span></span><br><span>--</span><br><span>Keith Smiley</span><br><span></span><br><span>On 02/24, Brent Royal-Gordon via swift-evolution wrote:</span><br><blockquote type="cite"><blockquote type="cite"><span>Motivation</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>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.</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>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?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>--</span><br></blockquote><blockquote type="cite"><span>Brent Royal-Gordon</span><br></blockquote><blockquote type="cite"><span>Architechies</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>swift-evolution mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br></blockquote><blockquote type="cite"><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></blockquote></div></blockquote></body></html>