[swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

Christopher Kornher ckornher at me.com
Sat May 13 15:27:51 CDT 2017

https://github.com/apple/swift-evolution/blob/master/proposals/0176-enforce-exclusive-access-to-memory.md <https://github.com/apple/swift-evolution/blob/master/proposals/0176-enforce-exclusive-access-to-memory.md>
What is your evaluation of the proposal?
+1 It seems to be a carefully considered and balanced approach to simultaneous memory access in single threaded code.
Is the problem being addressed significant enough to warrant a change to Swift?
It sure seems to be.
Does this proposal fit well with the feel and direction of Swift?
Absolutely. Safety is one of the paramount goals of Swift and the ‘gotchas’ listed in the document can lead to subtle bugs, with potentially fatal consequences.
If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
variants of `memcpy()` and similar C functions. Complex manipulation of data structures  in C, and C++ could lead to similar issues, I suppose, but the simple memory model of these languages puts developers on guard against simultaneous memory access. I certainly was not aware of these issues is Swift, but I am very cautious around mutating value types.  I expect that many Swift developers coming from classical OO languages are similarly wary of mutating value types, or should be. Fixing these issues will give me more confidence when dealing with mutating value types.
How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
I read through the proposal. It is very well written.  While I did not carefully study each case, I feel that I have a good understanding of the problem and the philosophy behind the solution. I feel confident that this will be a big improvement to the safety of Swift.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170513/5119a1fd/attachment.html>

More information about the swift-evolution mailing list