> On Nov 30, 2016, at 4:48 PM, Ben Cohen via swift-evolution
> <[email protected]> wrote:
>
>
> Hi swift-evolution,
>
> Below is a draft proposal for a change to facilitate fixing some memory
> safety issues in the standard library.
>
> If you’re interested in the implementation, PRs can be found here: [stdlib]
> [WIP] Eliminate version of Array.append(contentsOf:) that takes a Collection
> <https://github.com/apple/swift/pull/5521> and here: [stdlib] [WIP] Add
> UnsafeRawBufferPointer.initialize(as:from:)
> <https://github.com/apple/swift/pull/5718>
> (they need a bit of performance work before they’re ready to land)
>
> Introduction
>
> The version of UnsafeMutablePointer.initialize(from:) that takes a Collection
> should be deprecated in favour of a new method on UnsafeMutableBufferPointer
> that takes a Sequence, with a goal of improving memory safety and enabling
> faster initialization of memory from sequences. Similarly,
> UnsafeMutableRawPointer.initializeMemory(as:from:) should be deprecated in
> favour of a new UnsafeMutableRawBufferPointer.initialize(as:from:).
>
>
> <https://github.com/airspeedswift/swift-evolution/blob/b1d05032567e5c7b469f3ccca1bc1a42175a2400/proposals/NNNN-move-unsafe-initialize-from.md#motivation>
+1 on this proposal.
(looks like I had forgotten to reply to the list)
-Andy
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution