<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I would claim that perhaps it should be:</div><div class=""><br class=""></div><div class="">open func perform(inBackground aSelector: Selector, with anArgument: Any?)</div><div class=""><br class=""></div><div class="">That way it matches the completion family of the rest of performing. But if that is the case we should take a look at the onMainThread ones as well so they look like this perhaps:</div><div class=""><br class=""></div><div class="">open&nbsp;func&nbsp;perform(onMainThread aSelector:&nbsp;Selector, with arg:&nbsp;Any?, waitUntilDone wait:&nbsp;Bool, modes array: [String]?)</div><div class=""><br class=""></div><div class="">That way the call sites would look like this:</div><div class=""><br class=""></div><div class="">myObject.perform(inBackground: #selector(doBackgroundStuff), with: nil)</div><div class="">myObject.perform(onMainThread: #selector(doMainThreadStuff), with: nil)</div><div class="">myObject.perform(#selector(doDelayedThings), with: nil, afterDelay: 0.7)</div><div class="">let result = myObject.perform(#selector(doThingsNow), with: nil).takeUnretainedValue()</div><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 16, 2016, at 8:46 AM, Shawn Erickson via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="white-space:pre-wrap" class="">It is following the naming methodology of a sentence like structure "performed selector in background &lt;selector&gt; with &lt;object&gt;". It does read a little strange but likely comes from a simple remapping of the existing objective-c name for familiarly reasons.<br class=""><br class="">It could be performInBackground(selector:,with:) ... "Perform in background &lt;selector&gt; with &lt;object&gt;" but that also reads a little strange.<br class=""><br class="">-Shawn</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Aug 16, 2016 at 8:40 AM Paul Hudson via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br class="">
<br class="">
I just noticed that performSelectorInBackground(_:withObject:) has<br class="">
been mapped to performSelector(inBackground:with:) in Swift 3. So:<br class="">
<br class="">
performSelector(inBackground: #selector(doStuff), with: nil)<br class="">
<br class="">
This seems confusing to me – the "inBackground" label has little to do<br class="">
with the selector that is attached to it. It's possible this has been<br class="">
through careful API review and if so I apologize. On the other hand,<br class="">
if it's an oversight is there time for it to be looked at again?<br class="">
<br class="">
Thank you!<br class="">
<br class="">
<br class="">
Paul<br class="">
--<br class="">
Free Swift tutorials – <a href="http://hackingwithswift.com/" rel="noreferrer" target="_blank" class="">hackingwithswift.com</a><br class="">
_______________________________________________<br class="">
swift-corelibs-dev mailing list<br class="">
<a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class="">
</blockquote></div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></body></html>