[swift-evolution] [Review] SE-0088: Modernize libdispatch for Swift 3 naming conventions

Sean Heber sean at fifthace.com
Wed May 11 10:19:29 CDT 2016


I don’t know if this is a problem per-say, but very likely the API would often be used in code looking more like this:

DispatchQueue.main.dispatchAsynch {
 // stuff
}

And maybe this is just me, but the double occurrence of the word “dispatch” in there rubs me the wrong way. :P

This is probably silly, but we’re dealing with a “queue” here, so in some ways, could’t we “add” work to the queues or something?

DispatchQueue.main.add(.asynchronously) {
 // async..
}

l8r
Sean


> On May 11, 2016, at 10:10 AM, Cole Campbell via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> My main piece of feedback is that the method names synchronously() and asynchronously() don’t conform to Swift 3 naming conventions for functions and methods:
> 
> I agree.
> 
>> dispatchAsynch()
>> dispatchSynch()
> 
> I prefer something like this. It feels more Swifty. As it is, they aren't any longer than asynchronously(), if name length is a concern.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list