[swift-evolution] [Draft] UnsafeRawPointer API

Andrew Trick atrick at apple.com
Fri Jun 24 13:22:15 CDT 2016


> On Jun 24, 2016, at 11:17 AM, L. Mihalkovic <laurent.mihalkovic at gmail.com> wrote:
> 
> I like the watch-what-you-wish-for warning of unsafeCast.

I’ll try porting stdlib to the “UnsafeRawPointer.unsafeCast(to: T.Type)” syntax and see how bad it is.

> I think it was really brilliant to introduce the extra step... basically echos the alloc/init dichotomy of objc, so it should feel familiar to people with this 

Dave Abrahams advocated for this and it ended up making the memory model easier to explain in simple terms that correspond to the API.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160624/b8a870fa/attachment.html>


More information about the swift-evolution mailing list