[swift-evolution] What're the Swift team's thoughts on Go's concurrency?

David Sweeris davesweeris at mac.com
Wed Aug 10 17:22:27 CDT 2016


> On Aug 10, 2016, at 4:48 PM, Slava Pestov via swift-evolution <swift-evolution at swift.org> wrote:
> 
> As I understand it, a big weakness of Go's model is that it does not actually prevent data races. There's nothing preventing you from sharing pointers to mutable values between tasks, but I could be wrong about this.
Is that bad? Sharing pointers seems like a cheap way to share data, and as long as you know what you’re doing, why should the language get in the way? Now, if said code really does have performance advantages over the “safer” methods, and it really is safe because for whatever reason the race condition can’t actually happen, the language (or library) ought to have a way to express that without having to write “unsafe” code. In the meantime, though, you’ve gotta ship something that runs and meets performance requirements.

- Dave Sweeris


More information about the swift-evolution mailing list