[swift-dev] What do to when stdlib guidelines conflict with proposal?

2016-05-11 Thread Russ Bishop via swift-dev
I’m implementing SE-0017 but based on the standard library guidelines I think Unmanaged should have initializers that take UnsafePointer/UnsafeMutablePointer and vice-versa which would fit more naturally with the way other conversions work. A later commit already moved toOpaque to be an initia

Re: [swift-dev] LazyFilterCollection is not a Collection

2016-05-11 Thread Russ Bishop via swift-dev
Naively (and thinking about how this works on other platforms), I would expect Array(lazyFilterSequence) to iterate only once and take the hit of reallocation. Russ > On May 11, 2016, at 2:46 PM, Rob Napier via swift-dev > wrote: > > > On Mon, May 9, 2016 at 4:16 PM, Dmitri Gribenko

Re: [swift-dev] What do to when stdlib guidelines conflict with proposal?

2016-05-11 Thread Russ Bishop via swift-dev
> On May 11, 2016, at 4:50 PM, Dmitri Gribenko wrote: > > On Wed, May 11, 2016 at 2:53 PM, Russ Bishop via swift-dev > wrote: >> I’m implementing SE-0017 but based on the standard library guidelines I >> think Unmanaged should have initializers that take >> Unsa

Re: [swift-dev] What do to when stdlib guidelines conflict with proposal?

2016-05-11 Thread Russ Bishop via swift-dev
> On May 11, 2016, at 10:18 PM, Chris Lattner wrote: > As Dmitri, we specifically discussed this in the core team meeting (I brought > it up :-). The problem is that we really only want the toOpaque() method to > exist on UnsafePointer and don’t have the ability to model that in the > languag

Re: [swift-dev] [RFC] UnsafeBytePointer API for In-Memory Layout

2016-05-12 Thread Russ Bishop via swift-dev
> On May 12, 2016, at 11:21 AM, John McCall via swift-dev > wrote: > > Well, we can say "A program has undefined behavior if it does X or Y", or we > can say "A program which does X or Y lacks type safety". In all cases we are > referring to a concept defined elsewhere. If we say "undefined

Re: [swift-dev] What do to when stdlib guidelines conflict with proposal?

2016-05-12 Thread Russ Bishop via swift-dev
> On May 12, 2016, at 8:33 AM, Joe Groff wrote: > > We might want to wait till we review Andy's UnsafeBytePointer proposal. If we > accept that, it will separate UnsafePointer into its own type. > > -Joe Fair enough; I can hold off on this branch until then. Russ