[swift-evolution] Proposal: [stdlib] Remove withUnsafe[Mutable]Pointer[s]()

Chris Lattner clattner at apple.com
Mon Dec 21 18:46:49 CST 2015


> On Dec 16, 2015, at 2:40 PM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On Dec 16, 2015, at 2:25 PM, Jacob Bandes-Storch via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> Is there a reason that this couldn't be made to work?
>>     let ptr: UnsafePointer<Void> = &x
>> 
> Yeah, that could be made to work, and give an error if `x` isn't known to be a stored property.

However, in the face of resilience, that could only be known if x were explicitly declared to be fragile, or within the current module.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151221/0bb6d592/attachment.html>


More information about the swift-evolution mailing list