<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">With closures being first class citizens in Swift and the ability of closures to be able to capture scope, it seems a little archaic to me that the #selector() feature exists in Swift. </div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">For example, why does</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><span class="syntax-keyword" style="box-sizing:inherit;color:rgb(170,13,145);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">func</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"> </span><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">addTarget</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">(</span><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">_</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"> </span><span class="syntax-param-name" style="box-sizing:inherit;color:rgb(64,64,64);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">target</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">: Any?, </span><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">
action</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">: </span><a class="symbolref" href="https://developer.apple.com/documentation/objectivec/selector" style="box-sizing:inherit;color:rgb(92,38,153);text-decoration:none;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">Selector</a><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">, </span><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">
for</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"> </span><span class="syntax-param-name" style="box-sizing:inherit;color:rgb(64,64,64);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">controlEvents</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">: </span><a class="symbolref" href="https://developer.apple.com/documentation/uikit/uicontrolevents" style="box-sizing:inherit;color:rgb(92,38,153);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">UIControlEvents</a><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">)</span></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"><br></span></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><br><div class="bloop_sign" id="bloop_sign_1502344699995815936">have a Selector type for action. Why can’t action be defined to be a closure for example:</div><div class="bloop_sign" id="bloop_sign_1502344699995815936"><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">addTarget</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">(</span><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">_</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"> </span><span class="syntax-param-name" style="box-sizing:inherit;color:rgb(64,64,64);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">target</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">: Any?, </span><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">
action</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">: </span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(255,255,255)">(sender: UIControl?, forEvent event:UIEvent?) -> Void,</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"> </span><span class="syntax-identifier" style="box-sizing:inherit;font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">
for</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"> </span><span class="syntax-param-name" style="box-sizing:inherit;color:rgb(64,64,64);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">controlEvents</span><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">: </span><a class="symbolref" href="https://developer.apple.com/documentation/uikit/uicontrolevents" style="box-sizing:inherit;color:rgb(92,38,153);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre">UIControlEvents</a><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)">)</span></div><div class="bloop_sign" id="bloop_sign_1502344699995815936"><span style="color:rgb(51,51,51);font-family:'SF Mono',Menlo,monospace,'SF Pro Icons';font-size:15px;letter-spacing:-0.4050000011920929px;white-space:pre;background-color:rgb(249,250,250)"><br></span></div><div class="bloop_sign" id="bloop_sign_1502344699995815936">What do you guys think?</div><div class="bloop_sign" id="bloop_sign_1502344699995815936"><br></div><div class="bloop_sign" id="bloop_sign_1502344699995815936">Cheers!</div><div class="bloop_sign" id="bloop_sign_1502344699995815936"><br></div><div class="bloop_sign" id="bloop_sign_1502344699995815936">Mohit</div></body></html>