[swift-evolution] [Review] SE-0088: Modernize libdispatch for Swift 3 naming conventions
Andrew Brown
a.br at me.com
Thu May 12 10:33:15 CDT 2016
> On First, this is a huge breaking change, and it doesn’t really have to be one. The current SPM convention is to prefix C libraries with Lib. Following this convention, Dispatch (which is the C version) would be renamed to LibDispatch, and this new wrapper library would be called just Dispatch. With this setup, the old C api would still be there (under the module LibDispatch), which makes migration much easier. In the proposal, this issue is not addressed at all and it even says that all code using libdispatch would be affected. As it stands, that is not ok.
Separating existing dispatch from a new SwiftDispatch is a great idea. It would give the opportunity to really spend time working on the right approach for concurrency in swift without affecting existing production code and the hundreds of dispatch wrappers out there.
While we're on the subject: Dispatch Queues are 'queues' ... Isn't the right verb append (for asynchronous dispatch)?
DispatchQueue.main.append {
print("Hello Swift")
}
After all, asyncDispatch or dispatchAsync imply you are dispatching a synchronously - which you are not. The dispatch (sending for execution) is always synchronous, it's the execution which is asynchronous.
DispatchQueue.main.dispatchForAsynchronousExecution {
print("Help, I have repetitive strain injury")
}
Just my 2¢
Andrew.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160512/8ff22a02/attachment.html>
More information about the swift-evolution
mailing list