Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
` to `isKnownUniquelyReferenced`. - Cleanup the `ManagedBufferPointer` API by renaming `holdsUniqueReference` to `isUniqueReference` and removing `holdsUniqueOrPinnedReference`. > On Jul 20, 2016, at 10:24 AM, Arnold Schwaighofer via swift-evolution > <swift-evolution@swift.org> wrote: > >>

Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
> On Jul 20, 2016, at 10:12 AM, Arnold Schwaighofer via swift-evolution > <swift-evolution@swift.org> wrote: > >> >> On Jul 20, 2016, at 9:54 AM, Andrew Trick <atr...@apple.com> wrote: >> >> >>> On Jul 20, 2016, at 9:44 AM, Ar

Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
> On Jul 20, 2016, at 9:54 AM, Andrew Trick wrote: > > >> On Jul 20, 2016, at 9:44 AM, Arnold Schwaighofer >> wrote: >> >> >> The question is are they relying on the non-@objc post-condition when the >> API returns true? If they were to implement

Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
> On Jul 20, 2016, at 9:09 AM, Andrew Trick <atr...@apple.com> wrote: > > >> On Jul 20, 2016, at 6:12 AM, Arnold Schwaighofer via swift-evolution >> <swift-evolution@swift.org> wrote: >> >>> isUniquelyReferencedNonObjC checks that the objec

Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
> On Jul 20, 2016, at 5:55 AM, Arnold Schwaighofer via swift-evolution > <swift-evolution@swift.org> wrote: > >> >> On Jul 19, 2016, at 11:06 PM, Dmitri Gribenko <griboz...@gmail.com> wrote: >> >> On Tue, Jul 19, 2016 at 10:51 PM, Chris Lattn

Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
> On Jul 20, 2016, at 5:03 AM, Haravikk via swift-evolution > wrote: > >> >> On 20 Jul 2016, at 11:13, Brent Royal-Gordon via swift-evolution >> wrote: >> >>> On Jul 19, 2016, at 11:06 PM, Dmitri Gribenko via swift-evolution >>>

Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
> On Jul 20, 2016, at 3:13 AM, Brent Royal-Gordon > wrote: > >> On Jul 19, 2016, at 11:06 PM, Dmitri Gribenko via swift-evolution >> wrote: >> >> - I find it a little strange to see a mention of Objective-C, and a >> negation in

Re: [swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced

2016-07-20 Thread Arnold Schwaighofer via swift-evolution
> On Jul 19, 2016, at 11:06 PM, Dmitri Gribenko wrote: > > On Tue, Jul 19, 2016 at 10:51 PM, Chris Lattner wrote: >> The review of "SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced" >> begins now and runs through July 22. The proposal is

Re: [swift-evolution] Pitch: Replace UnsafeMutablePointer by UnsafePointer in non-mutating APIs

2016-07-19 Thread Arnold Schwaighofer via swift-evolution
I limited this to the stdlib. > On Jul 19, 2016, at 2:57 PM, Xiaodi Wu <xiaodi...@gmail.com> wrote: > > Is this limited to auditing the stdlib only or other APIs as well with Swift > overlays/API notes? > On Tue, Jul 19, 2016 at 16:47 Arnold Schwaighofer via swift-evolutio

Re: [swift-evolution] Pitch: Remove `NonObjectiveCBase` and replace `isUniquelyReferenced` by `isUniquelyReferencedUnsafe`

2016-07-18 Thread Arnold Schwaighofer via swift-evolution
object: T) API that would assume > the object to be a non-@objc class and only check this precondition under > -Onone. There is however no good reason to keep this API given that the > isUniquelyReferencedNonObjC is as performant when the type is statically > known to be non-

Re: [swift-evolution] Pitch: Remove `NonObjectiveCBase` and replace `isUniquelyReferenced` by `isUniquelyReferencedUnsafe`

2016-07-16 Thread Arnold Schwaighofer via swift-evolution
rnold <aschwaigho...@apple.com> wrote: >>>> >>>> >>>> >>>> On Jul 16, 2016, at 8:45 PM, Andrew Trick <atr...@apple.com> wrote: >>>> >>>>> >>>>>> On Jul 16, 2016, at 8:36 PM, Arnold

Re: [swift-evolution] Pitch: Remove `NonObjectiveCBase` and replace `isUniquelyReferenced` by `isUniquelyReferencedUnsafe`

2016-07-16 Thread Arnold Schwaighofer via swift-evolution
Thank you Dmitri for your feedback. Updated draft below. https://github.com/aschwaighofer/swift-evolution/blob/remove_nonobjectivecbase/proposals/-remove-nonobjectivecbase.md Remove NonObjectiveCBase and replace isUniquelyReferenced by isUniquelyReferencedUnsafe Proposal: SE-

[swift-evolution] Pitch: Remove `NonObjectiveCBase` and replace `isUniquelyReferenced` by `isUniquelyReferencedUnsafe`

2016-07-16 Thread Arnold Schwaighofer via swift-evolution
https://bugs.swift.org/browse/SR-1962 # Remove `NonObjectiveCBase` and replace `isUniquelyReferenced` by `isUniquelyReferencedUnsafe` ## Introduction Remove `NonObjectiveCBase` and replace`isUniquelyReferenced(_ object: T)` by `isUniquelyReferencedUnsafe(_ object: T)`. This will remove

Re: [swift-evolution] [Pitch] `Int.init(ObjectIdentifier)` and `UInt.init(ObjectIdentifier)` should have a `bitPattern:` label

2016-07-15 Thread Arnold Schwaighofer via swift-evolution
This is probably uncontroversial. PR: https://github.com/apple/swift-evolution/pull/434 > On Jul 13, 2016, at 4:39 PM, Arnold Schwaighofer via swift-evolution > <swift-evolution@swift.org> wrote: > > Int.init(ObjectIdentifier) and UInt.init(ObjectIdentifier) should hav

[swift-evolution] [Pitch] `Int.init(ObjectIdentifier)` and `UInt.init(ObjectIdentifier)` should have a `bitPattern:` label

2016-07-13 Thread Arnold Schwaighofer via swift-evolution
Int.init(ObjectIdentifier) and UInt.init(ObjectIdentifier) should have a 'bitPattern:’ label to make it clear at the use site that we interpret the value as a bit pattern. In Swift we have ObjectIdentifier values which uniquely identify a class instance or metatype. They are implemented as a

Re: [swift-evolution] [Proposal] Add an API to Unmanaged to get the instance it holds "@guaranteed"

2016-03-15 Thread Arnold Schwaighofer via swift-evolution
Updated proposal: use a method that accepts a closure to delineate the required guaranteed lifetime for which the assertion by the programmer holds. And, hopefully, no optimizer language speak. Add an API to Unmanaged to get the instance it holds @guaranteed Proposal: SE- Add an API to

Re: [swift-evolution] [Proposal] Add an API to Unmanaged to get the instance it holds "@guaranteed"

2016-03-14 Thread Arnold Schwaighofer via swift-evolution
> On Mar 14, 2016, at 3:08 PM, Arnold Schwaighofer via swift-evolution > <swift-evolution@swift.org> wrote: > >> >> On Mar 14, 2016, at 1:29 PM, John McCall <rjmcc...@apple.com> wrote: >> >>> On Mar 14, 2016, at 12:51 PM, Arnold Schwaighofer &