[swift-corelibs-dev] NSObject's performSelector(inBackground:with:) doesn't feel right in Swift 3
shawnce at gmail.com
Tue Aug 16 10:46:28 CDT 2016
It is following the naming methodology of a sentence like structure
"performed selector in background <selector> with <object>". It does read a
little strange but likely comes from a simple remapping of the existing
objective-c name for familiarly reasons.
It could be performInBackground(selector:,with:) ... "Perform in background
<selector> with <object>" but that also reads a little strange.
On Tue, Aug 16, 2016 at 8:40 AM Paul Hudson via swift-corelibs-dev <
swift-corelibs-dev at swift.org> wrote:
> I just noticed that performSelectorInBackground(_:withObject:) has
> been mapped to performSelector(inBackground:with:) in Swift 3. So:
> performSelector(inBackground: #selector(doStuff), with: nil)
> This seems confusing to me – the "inBackground" label has little to do
> with the selector that is attached to it. It's possible this has been
> through careful API review and if so I apologize. On the other hand,
> if it's an oversight is there time for it to be looked at again?
> Thank you!
> Free Swift tutorials – hackingwithswift.com
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-corelibs-dev