Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-29 Thread Joe Groff via swift-evolution
> On Dec 19, 2015, at 1:09 PM, Dave Abrahams via swift-evolution > wrote: > > Please see my comment here > I'm open to changing how we import void* from C. I think it's pretty important that

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-29 Thread Janosch Hildebrand via swift-evolution
I like "transfer" but I think this would be mostly helpful to people familiar with manual ref. counting in Obj-C. It's probably just as confusing to others and the visual similarity could be confusing as well (like with `Unmanaged`). But I also wouldn't be opposed to these if they were

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread Brent Royal-Gordon via swift-evolution
>> CFAttributedString has actually been audited, but pretend it hasn't been... >> >> let attributedString = CFAttributedStringCreate(nil, >> anotherString,nil).takeCreatedObject() >> let str = >> CFAttributedStringGetString(attributedString).takeRetrievedObject() >> >> I'm not a huge

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread T.J. Usiyan via swift-evolution
> > Date: Fri, 18 Dec 2015 11:38:31 -0800 > > From: Dave Abrahams <dabrah...@apple.com> > > Subject: Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged > > Message-ID: <e82aada9-f4a4-4e4e-98c3-6e9a3cec4...@apple.com> > > > >> > On Dec 1

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread Jordan Rose via swift-evolution
> On Dec 19, 2015, at 19:43 , Dave Abrahams via swift-evolution > wrote: > >> >> On Dec 19, 2015, at 4:22 PM, Brent Royal-Gordon > > wrote: >> Mainly, because simply saying "release" or "released" is a

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread Jacob Bandes-Storch via swift-evolution
Hi Dave, Thanks for sharing the proposal. I finally had a chance to catch up with the discussion. Generally I like the proposal and it would serve my needs well. I share others' concern that completely manual retain/release calls should still be allowed in some way. This doesn't have to be via

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread Félix Cloutier via swift-evolution
There's still the "release" issue (std::unique_ptr::release versus -[NSObject release]), but "transfer" seems like a good word to me. What about "transferByRetaining" and "transferWithoutRetaining"? Félix > Le 20 déc. 2015 à 00:01:22, Nevin Brackett-Rozinsky via swift-evolution >

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread Dave Abrahams via swift-evolution
> On 18/12/15 16:46 , swift-evolution-requ...@swift.org > <mailto:swift-evolution-requ...@swift.org> wrote: > > Date: Fri, 18 Dec 2015 11:38:31 -0800 > > From: Dave Abrahams <dabrah...@apple.com <mailto:dabrah...@apple.com>> > > Subject: Re: [swift-evolution] R

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread Dave Abrahams via swift-evolution
> On Dec 19, 2015, at 2:59 PM, Brent Royal-Gordon > wrote: > >>> CFAttributedString has actually been audited, but pretend it hasn't been... >>> >>> let attributedString = CFAttributedStringCreate(nil, >>> anotherString,nil).takeCreatedObject() >>> let str =

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-19 Thread Dave Abrahams via swift-evolution
> On Dec 19, 2015, at 4:22 PM, Brent Royal-Gordon > wrote: > >>> Mainly, because simply saying "release" or "released" is a bit ambiguous to >>> me.Are you saying it *has been* released, or are you saying it *needs to >>> be* released? >> >> But nobody proposed

Re: [swift-evolution] RFC: Proposed rewrite of Unmanaged

2015-12-18 Thread Janosch Hildebrand via swift-evolution
I like `UnsafeReference` as the new name of the type and I think the basic API is clearer than with `Unmanaged`. The initializers are much better than the static methods and `take(Un)RetainedValue()` were certainly less than ideal method names. > On 18 Dec 2015, at 02:37, Dave Abrahams via