[swift-evolution] Contiguous Memory and the Effect of Borrowing on Safety

Dave Abrahams dabrahams at apple.com
Sun Nov 6 20:53:15 CST 2016


on Sun Nov 06 2016, Daniel Duan <daniel-AT-duan.org> wrote:

>> On Nov 6, 2016, at 1:20 PM, Dave Abrahams via swift-evolution
>> <swift-evolution at swift.org> wrote:
>> 
>> A construct that is only conditionally unsafe
>> shouldn't be spelled "unsafe" when used in a safe way, right?  So this
>> *seems* to argue for an "unsafe" keyword that can be used to label
>> the constructs that actually add unsafety (as has been previously
>> suggested on this list).  Other ideas are of course most welcome.
>> 
>
> How would “unsafe” coexist with memory ownership model? It seems to me
> that there’s some overlapping concepts here (borrowed/moved). 

Yes, the ownership model covers borrowing.

> I haven’t formulated any complete thoughts on this topic. Just had a
> feeling that we should take the ownership model in mind as we tackle
> this.

That was a main point of my posting.  Apologies if that wasn't made
clear.

-- 
-Dave


More information about the swift-evolution mailing list