[swift-evolution] [swift-evolution-announce] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size
kelvin13ma at gmail.com
Thu Sep 7 00:15:31 CDT 2017
okay so I think so far what’s been agreed on is
*1*. rename “Bytes” to “Memory” in the raw pointer API. Note: this brings
the `copyBytes<C>(from:)` collection method into the scope of this proposal
*2*. change raw offsets to be in terms of bytes, not typed strides. This
argument will be called `atByteOffset:` and will only appear in
UnsafeMutableRawBufferPointer. “at:” arguments are no longer needed in
UnsafeMutableRawPointer, since we can just use pointer arithmetic now.
*3*. move UnsafeMutableBufferPointer’s `at:` arguments to the front of the
parameter list. mostly cause any pointer arithmetic happens in the front so
structurally we want to mirror that.
*4*. add dual (to:) single element initializers and assigners to
UnsafeMutablePointer, but not UnsafeMutableRawPointer because it’s
apparently not useful there.
loses its default count to prevent confusion with its buffer variant.
*5*. memory deallocation on buffer pointers is clearly documented to only
be defined behavior when the buffer matches a whole heap block.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution