[swift-evolution] [late pitch] UnsafeBytes proposal

Brent Royal-Gordon brent at architechies.com
Fri Aug 12 21:32:11 CDT 2016


> On Aug 12, 2016, at 6:12 PM, Andrew Trick via swift-evolution <swift-evolution at swift.org> wrote:
> 
> This proposal adds basic usability for working with raw memory without breaking source. The need to provide higher level API for working with raw memory buffers has always been evident, but making improvements in this area depended on first introducing `UnsafeRawPointer`. It was not clear until the final week of source-breaking changes whether SE-0107 would make it into Swift 3. Now that it has, we should use the little remaining time to improve the migration experience and encourage correct use of the memory model by introducing a low-risk additive API.
> 
> Proposal:
> 
> https://github.com/atrick/swift-evolution/blob/unsafebytes/proposals/NNNN-UnsafeBytes.md
> 
> <NNNN-UnsafeBytes.md>

I've only read a little but so far, but: Is the difference between this and UnsafeBufferPointer that it's built around a raw pointer rather than a bound pointer? If so, would UnsafeRawBufferPointer be a better name?

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list