[swift-evolution] [Review] SE-0107: UnsafeRawPointer API (binding memory to type)
me at benrimmington.com
Mon Jul 11 02:50:44 CDT 2016
> On 10 Jul 2016, at 14:41, Andrew Trick via swift-evolution <swift-evolution at swift.org> wrote:
> I'm revising this proposal based on last week's feedback. A few of the
> additive APIs are removed and a number of UnsafePointer and
> UnsafeRawPointer methods are renamed.
> Here is a PR for the revision. Note that the examples in the proposal
> text still need to be updated:
> I updated the short-form summary of the API:
> The full UnsafeRawPointer API with doc comments is here:
> The UnsafePointer and UnsafeRawPointer changes are on this branch:
> If you wish to comment line-by-line on the detailed docs or
> implementation, you can do so here:
> The only concern I have about this version of the proposal is this method name:
> func copyBytes(from: UnsafeRawPointer, count: Int)
> because `count` usually refers to a number of values. I think it should be:
> func copy(bytes: Int, from: UnsafeRawPointer)
Using `bytes` to label the count / length / size would be inconsistent with:
UnsafeMutableRawPointer could use a `size` or `sizeInBytes` label.
(This also applies to the `allocate` and `deallocate` methods).
More information about the swift-evolution