Ah yeah didn&#39;t notice the others got named that way without the selector after perform. Yeah it seems like it was simply mismapped. I suggest filling a radar about ASAP (not in the standard library realm).<br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 16, 2016 at 8:52 AM Philippe Hausler &lt;<a href="mailto:phausler@apple.com">phausler@apple.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I would claim that perhaps it should be:</div><div><br></div><div>open func perform(inBackground aSelector: Selector, with anArgument: Any?)</div><div><br></div><div>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><br></div><div>open func perform(onMainThread aSelector: Selector, with arg: Any?, waitUntilDone wait: Bool, modes array: [String]?)</div><div><br></div><div>That way the call sites would look like this:</div><div><br></div><div>myObject.perform(inBackground: #selector(doBackgroundStuff), with: nil)</div><div>myObject.perform(onMainThread: #selector(doMainThreadStuff), with: nil)</div><div>myObject.perform(#selector(doDelayedThings), with: nil, afterDelay: 0.7)</div><div>let result = myObject.perform(#selector(doThingsNow), with: nil).takeUnretainedValue()</div></div><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Aug 16, 2016, at 8:46 AM, Shawn Erickson via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" target="_blank">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br><div><div style="white-space:pre-wrap">It is following the naming methodology of a sentence like structure &quot;performed selector in background &lt;selector&gt; with &lt;object&gt;&quot;. It does read a little strange but likely comes from a simple remapping of the existing objective-c name for familiarly reasons.<br><br>It could be performInBackground(selector:,with:) ... &quot;Perform in background &lt;selector&gt; with &lt;object&gt;&quot; but that also reads a little strange.<br><br>-Shawn</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 16, 2016 at 8:40 AM Paul Hudson via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" target="_blank">swift-corelibs-dev@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
I just noticed that performSelectorInBackground(_:withObject:) has<br>
been mapped to performSelector(inBackground:with:) in Swift 3. So:<br>
<br>
performSelector(inBackground: #selector(doStuff), with: nil)<br>
<br>
This seems confusing to me – the &quot;inBackground&quot; label has little to do<br>
with the selector that is attached to it. It&#39;s possible this has been<br>
through careful API review and if so I apologize. On the other hand,<br>
if it&#39;s an oversight is there time for it to be looked at again?<br>
<br>
Thank you!<br>
<br>
<br>
Paul<br>
--<br>
Free Swift tutorials – <a href="http://hackingwithswift.com/" rel="noreferrer" target="_blank">hackingwithswift.com</a><br>
_______________________________________________<br>
swift-corelibs-dev mailing list<br>
<a href="mailto:swift-corelibs-dev@swift.org" target="_blank">swift-corelibs-dev@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br>
</blockquote></div>
_______________________________________________<br>swift-corelibs-dev mailing list<br><a href="mailto:swift-corelibs-dev@swift.org" target="_blank">swift-corelibs-dev@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" target="_blank">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br></div></blockquote></div><br></div></blockquote></div>