[swift-evolution] Evolving UnsafeMutablePointer.alloc (was Re: [Review] SE-0006 Apply API Guidelines to the Standard Library)

Chris Lattner clattner at apple.com
Sat Jan 23 14:50:21 CST 2016


> On Jan 23, 2016, at 11:56 AM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On Jan 23, 2016, at 11:38 AM, T.J. Usiyan <griotspeak at gmail.com <mailto:griotspeak at gmail.com>> wrote:
>> 
>> I agree that the need to immediately wrap in a BufferPointer is awkward. I've been consistently thrown by the fact that we specify how many items to allocate on the 'single' pointers, though.
> 
> Definitely. It would make sense to me if UnsafeMutablePointer's allocation and deallocation APIs worked only for single values, and UnsafeMutableBufferPointer provided similar APIs to allocate and deallocate arrays.

I agree, that makes a lot of sense.

-Chris

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


More information about the swift-evolution mailing list