[swift-evolution] [late pitch] UnsafeBytes proposal

Brent Royal-Gordon brent at architechies.com
Sat Aug 13 02:17:58 CDT 2016

> On Aug 12, 2016, at 9:34 PM, Andrew Trick <atrick at apple.com> wrote:
> That matrix is the correct starting point. UnsafeRawBufferPointer would be in the lower right. But it would be nothing more than a raw pointer with length. It wouldn’t be a collection of anything. UnsafeBytes is a powerful abstraction on top of what we just called UnsafeRawBufferPointer. It is a collection of typed elements `UInt8`. 

But how is that different from UnsafeBufferPointer? Put another way, what is it about the UnsafeRawPointer -> UnsafeBytes relationship that isn't true about UnsafePointer -> UnsafeBufferPointer, and that therefore justifies the different name?

Brent Royal-Gordon

More information about the swift-evolution mailing list