[swift-evolution] [swift-evolution-announce] SE-0138 UnsafeBytes

Andrew Trick atrick at apple.com
Fri Sep 2 15:51:17 CDT 2016

> On Sep 2, 2016, at 1:34 PM, Tony Parker <anthony.parker at apple.com> wrote:
> Arguments of being out of time do not compel me, personally. Introducing a new type is effectively permanent. We just got started with introducing Swift API. I don’t want to accidentally saddle ourselves with additional complexity forever without giving ourselves an adequate opportunity to fully consider what the right long-term solution is. The fact that you’ve already described the mismatch between struct Data and this type as “unfortunate” sounds, to me, like a big problem.

There is no mismatch between Data and UnsafeBytes. Data requires UnsafeBytes whenever the user is working with UnsafeRawPointers. UnsafeBytes is meant to enable interoperability with Data in these cases.

I included the Framework Interfaces section so that you could see what I think right long term solution is:
https://github.com/apple/swift-evolution/blob/master/proposals/0138-unsafebytes.md#framework-interfaces <https://github.com/apple/swift-evolution/blob/master/proposals/0138-unsafebytes.md#framework-interfaces>

If you have any concrete concerns about that long-term solution, then that would be good raise.


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

More information about the swift-evolution mailing list