discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Object naming? and tree-based XML/HTML parsing


From: Fred Kiefer
Subject: Re: Object naming? and tree-based XML/HTML parsing
Date: Thu, 09 Aug 2007 10:40:22 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20060911)

Daniel Ringwalt wrote:
> I've picked up this much from the source code of gnustep-base:
> 
> 1. Objects that are part of the OpenStep specification start with NS.
> 2. Additions to OpenStep, like Apple's event-driven XML parsing, start
> with GS.
> Please don't flame me about the above, I don't know if GNUstep or
> Apple created this first.
> 

Only Next and Apple should use the NS prefix, for our own classes in the
libraries we use GS and application programmers should of course use
what ever they want, but not these two to avoid conflicts.

> What I don't understand are why there are duplicates like NSArray/
> GSArray. GSArray seems to be larger and under more scrutiny, but then
> why is NSArray and not GSArray the one used by other objects? What
> sort of additions are there in GSArray, and why is NSArray still
> there?
> 

NSArray is a class cluster. The class NSArray implements a lot of
methods, but leaves some atomic methods unimplemented (count,
objectAtIndex:, initWithObjects:count:). Concrete subclasses of NSArray,
such as GSArray, implement these methods for a specific way of storing
things. There may be different ways to do so, and actually there is
GSInlineArray as well. If we ever come up with a linked list based
implementation of NSArray, we could keep this hidden from the user and
just provider the better runtime behaviour (it is more likely for
NSMutableArray though).
The concept of class clusters where there is one public interface class,
but multiple hidden implementation classes can be viewed in NSString nad
other parts of base as well.

> And are there any plans to implement Apple's tree-based XML parsing
> (NSXMLNode, etc.)? How compatible is GSXMLParser to Apple's
> NSXMLParser?
> 

You may have to wait until Richard is back from his holidays to get a
proper answer for this question.

Cheers,
Fred




reply via email to

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