Foundation is the framework which defines NSObject. If you want to write software which will compile on systems other than Mac OS X (Linux, for example), there are basically 2 alternatives. The first is to use GNUstep - an open-source implementation of NeXT's OpenStep specification.

If you don't feel like using NSObject as your base class, then you'll want to go with the second option: the Object class which is distributed with gcc. To use it, #import <objc/Object.h>.

hangt5 Wrote:Does NSObject have anything that the "Object" class does not?

Object is now quite similar to NSObject. It supports +alloc and -init, just like NSObject (it used to use +new). Both fulfil the same purpose, but they do have their differences. Have a look at the header files for each if you're interested:

If you want to use things like NSString, NSDictionary, or NSArray, you need to go with NSObject. If you want to start from scratch and/or want to support platforms other than Mac OS X (like Linux, Solaris, or HP-UX), go with Object.

Edit: I just realized something fundamental to NSObject has which Object does not have: -retain and -release methods. I guess you'd have to subclass Object to get the retain count functionality.