go-vs-swift icon indicating copy to clipboard operation
go-vs-swift copied to clipboard

Clarify Swift concurrency model

Open jakerockland opened this issue 8 years ago • 2 comments

/u/maizirinid

You might probably want to rephrase the statement on Swift concurrency. It is just that Swift has yet to define a concurrency model or any in-built concurrency feature. Moreover, while libdispatch is a common choice of task based parallelism, C and ObjC interoperability allow many other options for concurrency.

/u/sobri909

On the concurrency issue, it looks like Apple are hoping to focus on bringing it into the language in Swift 5, perhaps sometime around 2018. Lattner touched on it in some slides recently. He also discussed the different memory management models and their pros and cons.

jakerockland avatar Dec 23 '16 21:12 jakerockland

/u/hundley10

Good paper. I use Swift and Go heavily, and I think you made a pretty accurate comparison. One correction, though: you say that Grand Central Dispatch is coupled to iOS/macOS development, but that's not longer the case - GCD is fully compatible with Linux. There's no question that Go's concurrency model is much better than Swift's, but I'm excited to see how it becomes a language feature around Swift 4/5.

jakerockland avatar Dec 23 '16 22:12 jakerockland

https://github.com/apple/swift-corelibs-libdispatch

jakerockland avatar Jan 19 '17 06:01 jakerockland