[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CoreBase toll-free bridging
From: |
Maxthon Chan |
Subject: |
Re: CoreBase toll-free bridging |
Date: |
Mon, 11 Mar 2013 15:56:54 +0800 |
Can we make a GSPointerWrapper class or like to wrap non-objects into objects
so that they can be safely placed into the existing NSArray/NSDictionary
objects in order to implement CF objects in Objective-C? And as I said,
CoreFoundation is designed to support both Foundation and Carbon on OS X, thus
running in a lower layer. We don't have that Carbon issue, thus we really can
safely implement CoreBase on the layer higher than Base and use something like
GSPointerWrapper to emulate its low-level behaviors.
在 2013-3-11,上午7:04,Stefan Bidi <address@hidden> 写道:
> The option to implement CoreBase on top of Base was done in the
> beginning. The problem here is that CF works in a much lower level
> than Cocoa and as such a lot of functionality simply cannot be
> implemented this way. For example, collection classes like CFArray
> and CFDictionary allow for non-objects to be added as keys and values,
> this isn't allowed for NSArray and Dictionary.
>
> That's just one example. That was the original direction and I had to
> eventually move to re-implementing everything in order to have full
> compatibility. I do borrow a lot of code from Base, though.
>
> On Sun, Mar 10, 2013 at 5:20 PM, Luboš Doležel <address@hidden> wrote:
>> On 03/10/2013 11:04 PM, Chan Maxthon wrote:
>>>
>>> How about reversing the relationship on GNUstep: implement CoreBase
>>> in Objective-C. Everything except CFRetain() and CFRelease() can be
>>> built with ARC, and CF objects are typedef'd to their respective
>>> Objective-C counterpart. Apple invented CF to serve Carbon and Cocoa
>>> simultaneously, but we don't have that Carbon trouble so we can
>>> really bravely implement CF using Obj-C.
>>
>>
>> Umm, I suppose it might be doable (without giving it much thought), though a
>> lot of Stefan's work on corebase would get thrown away.
>>
>> I haven't been around when gnustep-corebase was launched, so I can't tell
>> whether this option has been considered...?
>>
>> --
>> Luboš Doležel
>>
>>
>> _______________________________________________
>> Gnustep-dev mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/gnustep-dev
- Re: CoreBase toll-free bridging, (continued)
Re: CoreBase toll-free bridging, Chan Maxthon, 2013/03/10
Re: CoreBase toll-free bridging, David Chisnall, 2013/03/11
- Re: CoreBase toll-free bridging, Luboš Doležel, 2013/03/11
- Re: CoreBase toll-free bridging, David Chisnall, 2013/03/11
- Re: CoreBase toll-free bridging, Luboš Doležel, 2013/03/11
- Re: CoreBase toll-free bridging, Stefan Bidi, 2013/03/11
- Re: CoreBase toll-free bridging, Luboš Doležel, 2013/03/11
- Re: CoreBase toll-free bridging, Riccardo Mottola, 2013/03/11
- Re: CoreBase toll-free bridging, Stefan Bidi, 2013/03/11
- Re: CoreBase toll-free bridging, David Chisnall, 2013/03/11
- Re: CoreBase toll-free bridging, Chan Maxthon, 2013/03/11