Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-10-02 Thread Andrew Trick via swift-evolution
> On Sep 30, 2017, at 10:45 AM, Taylor Swift wrote: > > this function initializeMemory(as:from:) says it will be > removed in Swift 4.0. It is now Swift 4.0. can I remove it? It looks safe to remove. However, the doc comments in the same file should be updated to refer to `initializeMemory(a

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-07 Thread Taylor Swift via swift-evolution
On Thu, Sep 7, 2017 at 1:33 PM, Jordan Rose wrote: > > > On Sep 5, 2017, at 14:50, Andrew Trick via swift-evolution < > swift-evolution@swift.org> wrote: > > We don't have a consensus, but I think the suggestion to distinguish > between single value vs. multiple semantics was good. Otherwise, > a

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-07 Thread Jordan Rose via swift-evolution
> On Sep 5, 2017, at 14:50, Andrew Trick via swift-evolution > wrote: > > We don't have a consensus, but I think the suggestion to distinguish > between single value vs. multiple semantics was good. Otherwise, > adding the default count could be very misleading. Normally, we try to > minimize

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Andrew Trick via swift-evolution
> On Sep 5, 2017, at 6:28 PM, Taylor Swift wrote: > >> >> UMRP (raw pointer): >> --- func initializeMemory(as:at:(=0)count:(1)to:) >> +++ func initializeMemory(as:repeating:count:) // remove default count >> >> still extremely suspicious of this but i’m willing to compromise. also there >> s

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Taylor Swift via swift-evolution
On Tue, Sep 5, 2017 at 5:36 PM, Andrew Trick wrote: > >>> In the new raw initializeMemory methods, Xiaodi and I agreed to make >>> it more clear that the offset is in terms of `self` rather than >>> `from`, and to further reduce ambiguity by forcing manual stride >>> computation and using an expl

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Andrew Trick via swift-evolution
> > In the new raw initializeMemory methods, Xiaodi and I agreed to make > it more clear that the offset is in terms of `self` rather than > `from`, and to further reduce ambiguity by forcing manual stride > computation and using an explicit "offset" label. The call site will > be just as explicit

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Xiaodi Wu via swift-evolution
On Tue, Sep 5, 2017 at 17:16 Taylor Swift wrote: > I’m fine with most of this > > On Tue, Sep 5, 2017 at 4:49 PM, Andrew Trick wrote: > >> >> On Sep 5, 2017, at 9:53 AM, Taylor Swift wrote: >> >> we agreed to deprecate the strided at:? Note that >> UnsafeMutableRawBufferPointer would still need

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Taylor Swift via swift-evolution
On Tue, Sep 5, 2017 at 5:16 PM, Taylor Swift wrote: > I’m fine with most of this > > On Tue, Sep 5, 2017 at 4:49 PM, Andrew Trick wrote: > >> >> On Sep 5, 2017, at 9:53 AM, Taylor Swift wrote: >> >> we agreed to deprecate the strided at:? Note that >> UnsafeMutableRawBufferPointer would still n

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Taylor Swift via swift-evolution
I’m fine with most of this On Tue, Sep 5, 2017 at 4:49 PM, Andrew Trick wrote: > > On Sep 5, 2017, at 9:53 AM, Taylor Swift wrote: > > we agreed to deprecate the strided at:? Note that > UnsafeMutableRawBufferPointer would still need a byteOffset: argument. > I’m also still not comfortable with

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Andrew Trick via swift-evolution
> On Sep 5, 2017, at 9:53 AM, Taylor Swift wrote: > > we agreed to deprecate the strided at:? Note that > UnsafeMutableRawBufferPointer would still need a byteOffset: argument. I’m > also still not comfortable with duplicating functionality for the sake of > having two names I’ll summarize w

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Michael Ilseman via swift-evolution
> On Sep 1, 2017, at 10:27 PM, Douglas Gregor via swift-evolution > wrote: > > Hello Swift community, > > The review of SE-0184 "Unsafe[Mutable][Raw][Buffer]Pointer: add missing > methods, adjust existing labels for clarity, and remove deallocation size" > begins now and runs through Septemb

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Taylor Swift via swift-evolution
we agreed to deprecate the strided at:? Note that UnsafeMutableRawBufferPointer would still need a byteOffset: argument. I’m also still not comfortable with duplicating functionality for the sake of having two names On Tue, Sep 5, 2017 at 11:31 AM, Andrew Trick wrote: > I think we’ve agreed to a

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-05 Thread Andrew Trick via swift-evolution
I think we’ve agreed to a few minor updates to this proposal. Since there hasn’t been any other feedback on the thread it may be worth posting an amended proposal so we all know what we’ve agreed on. -Andy > On Sep 3, 2017, at 8:23 PM, Andrew Trick via swift-evolution > wrote: > > >> On Sep

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-03 Thread Andrew Trick via swift-evolution
> On Sep 3, 2017, at 8:38 PM, Taylor Swift wrote: > > what was the reasoning for making raw at: offset in strides and not bytes? So, you’re talking about UnsafeMutableRawPointer(as:at:count:to:)… The thinking was that it was typical for users to continue filling in the memory using the same t

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-03 Thread Taylor Swift via swift-evolution
what was the reasoning for making raw at: offset in strides and not bytes? > On Sep 3, 2017, at 10:22 PM, Andrew Trick wrote: > > >>> On Sep 3, 2017, at 8:05 PM, Xiaodi Wu wrote: >>> >>> If we use byte offset, then the at parameter in UnsafeMutableRawPointer >>> should be removed, since poin

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-03 Thread Andrew Trick via swift-evolution
> On Sep 3, 2017, at 8:05 PM, Xiaodi Wu wrote: > > If we use byte offset, then the at parameter in UnsafeMutableRawPointer > should be removed, since pointer arithmetic can be used instead (just like > with UnsafeMutablePointer). > > I agree that it seems quite sensible to remove the ‘at’ par

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-03 Thread Xiaodi Wu via swift-evolution
On Sun, Sep 3, 2017 at 21:43 Taylor Swift wrote: > On Sat, Sep 2, 2017 at 7:53 PM, Andrew Trick wrote: > >> >> On Sep 2, 2017, at 5:34 PM, Xiaodi Wu wrote: >> >> On Sat, Sep 2, 2017 at 4:41 PM, Andrew Trick wrote: >> >>> >>> On Sep 2, 2017, at 2:06 PM, Taylor Swift via swift-evolution < >>> sw

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-03 Thread Taylor Swift via swift-evolution
On Sat, Sep 2, 2017 at 7:53 PM, Andrew Trick wrote: > > On Sep 2, 2017, at 5:34 PM, Xiaodi Wu wrote: > > On Sat, Sep 2, 2017 at 4:41 PM, Andrew Trick wrote: > >> >> On Sep 2, 2017, at 2:06 PM, Taylor Swift via swift-evolution < >> swift-evolution@swift.org> wrote: >> >> the subscript doesn’t kn

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Andrew Trick via swift-evolution
> On Sep 2, 2017, at 5:34 PM, Xiaodi Wu wrote: > > On Sat, Sep 2, 2017 at 4:41 PM, Andrew Trick > wrote: > >> On Sep 2, 2017, at 2:06 PM, Taylor Swift via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> the subscript doesn’t know about the stride t

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Xiaodi Wu via swift-evolution
On Sat, Sep 2, 2017 at 4:41 PM, Andrew Trick wrote: > > On Sep 2, 2017, at 2:06 PM, Taylor Swift via swift-evolution < > swift-evolution@swift.org> wrote: > > the subscript doesn’t know about the stride that you want to use. If you >>> want to get rid of the `at:` ambiguity, you have to get rid o

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Andrew Trick via swift-evolution
> On Sep 2, 2017, at 2:06 PM, Taylor Swift via swift-evolution > wrote: > > the subscript doesn’t know about the stride that you want to use. If you want > to get rid of the `at:` ambiguity, you have to get rid of it everywhere, or > users will just wind up having to remember two ways (one am

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Xiaodi Wu via swift-evolution
On Sat, Sep 2, 2017 at 4:06 PM, Taylor Swift wrote: > > > On Sat, Sep 2, 2017 at 3:39 PM, Xiaodi Wu wrote: > >> On Sat, Sep 2, 2017 at 2:13 PM, Taylor Swift >> wrote: >> >>> >>> >>> On Sat, Sep 2, 2017 at 10:03 AM, Xiaodi Wu via swift-evolution < >>> swift-evolution@swift.org> wrote: >>> O

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Taylor Swift via swift-evolution
On Sat, Sep 2, 2017 at 3:39 PM, Xiaodi Wu wrote: > On Sat, Sep 2, 2017 at 2:13 PM, Taylor Swift wrote: > >> >> >> On Sat, Sep 2, 2017 at 10:03 AM, Xiaodi Wu via swift-evolution < >> swift-evolution@swift.org> wrote: >> >>> On Sat, Sep 2, 2017 at 12:27 AM, Douglas Gregor via swift-evolution < >>>

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Xiaodi Wu via swift-evolution
On Sat, Sep 2, 2017 at 3:36 PM, Andrew Trick wrote: > Thanks for the review as always… > > On Sep 2, 2017, at 12:13 PM, Taylor Swift via swift-evolution < > swift-evolution@swift.org> wrote: > > > > On Sat, Sep 2, 2017 at 10:03 AM, Xiaodi Wu via swift-evolution evolut...@swift.org> wrote: > >> O

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Xiaodi Wu via swift-evolution
On Sat, Sep 2, 2017 at 2:13 PM, Taylor Swift wrote: > > > On Sat, Sep 2, 2017 at 10:03 AM, Xiaodi Wu via swift-evolution < > swift-evolution@swift.org> wrote: > >> On Sat, Sep 2, 2017 at 12:27 AM, Douglas Gregor via swift-evolution < >> swift-evolution@swift.org> wrote: >> >>> Hello Swift communi

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Andrew Trick via swift-evolution
Thanks for the review as always… > On Sep 2, 2017, at 12:13 PM, Taylor Swift via swift-evolution > wrote: > > > > On Sat, Sep 2, 2017 at 10:03 AM, Xiaodi Wu via swift-evolution > mailto:swift-evolution@swift.org>> wrote: > On Sat, Sep 2, 2017 at 12:27 AM, Douglas Gregor via swift-evolution

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Taylor Swift via swift-evolution
On Sat, Sep 2, 2017 at 10:03 AM, Xiaodi Wu via swift-evolution < swift-evolution@swift.org> wrote: > On Sat, Sep 2, 2017 at 12:27 AM, Douglas Gregor via swift-evolution < > swift-evolution@swift.org> wrote: > >> Hello Swift community, >> >> The review of SE-0184 "Unsafe[Mutable][Raw][Buffer]Pointe

Re: [swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-02 Thread Xiaodi Wu via swift-evolution
On Sat, Sep 2, 2017 at 12:27 AM, Douglas Gregor via swift-evolution < swift-evolution@swift.org> wrote: > Hello Swift community, > > The review of SE-0184 "Unsafe[Mutable][Raw][Buffer]Pointer: add missing > methods, adjust existing labels for clarity, and remove deallocation size" > begins now and

[swift-evolution] [Review] SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size

2017-09-01 Thread Douglas Gregor via swift-evolution
Hello Swift community, The review of SE-0184 "Unsafe[Mutable][Raw][Buffer]Pointer: add missing methods, adjust existing labels for clarity, and remove deallocation size" begins now and runs through September 7, 2017. The proposal is available here: https://github.com/apple/swift-evolution/blob/