[swift-evolution] [Draft] UnsafeRawPointer API

Andrew Trick atrick at apple.com
Thu Jun 23 20:40:40 CDT 2016


I sent two RFC's for this proposal over the past couple months (see Early swift-evolution threads). High-level feedback was fairly light. This version is a final draft, as I expect it to go through the review process next week. There is a lot more explanation and detail in this proposal now, and the memory model has been simplified and clarified.

https://github.com/atrick/swift-evolution/blob/voidpointer/proposals/XXXX-unsaferawpointer.md

If you have opinions or suggestions on API syntax, please make yourself heard. You can jump straight to the naming discussion here:

https://github.com/atrick/swift-evolution/blob/voidpointer/proposals/XXXX-unsaferawpointer.md#variations-under-consideration

Of particular interest may be the API names for:

- Memory allocation/deallocation: fairly fundamental to the language.

- Unsafe casting from raw pointers to typed pointers. This is going to impact a lot of code that needs C interoperability.

Keep in mind that we will make additive API improvements later for convenience. We want the fundamentals to be clear, explicit, and reasonably safe.

-Andy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: XXXX-unsaferawpointer.md
Type: text/markdown
Size: 57494 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160623/566fd2b3/attachment.bin>


More information about the swift-evolution mailing list