discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreBase and -base


From: Richard Frith-Macdonald
Subject: Re: CoreBase and -base
Date: Mon, 2 May 2011 11:35:39 +0100

On 21 Apr 2011, at 17:31, David Chisnall wrote:

> Hi Everyone,
> 
> There was some discussion a while ago about moving CoreBase into -base, but I 
> don't recall any final decision.  I'm currently looking at implementing 
> CFBundle.  Doing this in a separate framework is pretty easy if you don't 
> need to support any platforms where dlfcn.h doesn't exist[1], but ideally it 
> should use the same abstraction layer that NSBundle uses.  It can't be 
> implemented in terms of NSBundle, however, since it is a lower level class.  
> Ideally, either NSBundle should be refactored to use CFBundle, or they should 
> both share some common code - at the very least, CFBundle should probably use 
> the library loading abstraction code in -base, which is not currently 
> possible.

Yes ... I think we need to move CoreBase into -base as that has lots of 
advantages ...

One of the fundamental requirements for the Foundation/CoreFoundation pairing 
is the toll-free-bridging, and having the two parts together makes that easier 
to manage.

Having both parts in the same package is hugely easier for versioning and 
dependency management.

Since the two frameworks expose different functionality, you can't completely 
implement one on top of the other without one of them providing private APIs to 
the other (or both share common private code).  

As you suggest, in this case NSBundle and CFBundle should be sharing code.  I 
actually suspect it's probably best to implement a common subset and have both 
public APIs use that common subset.

Perhaps we could restructure the Source directory layout to have directories 
for public libraries: 'Additions', 'Base', 'CoreBase', 'ObjectiveC2' and 
directories for internal shared code ('Common') and system specific code 
(windows and unix)

Having both frameworks together also makes sense when we want to extend the 
base additions library ... it would mean that we can easily write additional 
Objective-C APIs to add functionality which Apple has only provided via their C 
API ... the base additions library would use base/corebase in the gnustep 
world, and would be able to use Foundation/CoreFoundation when build built on 
top of Cocoa (at present the base-additions code can only depend on the 
Foundation API and has to implement other stuff from scratch).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]