The defobj library contains a variety of basic facilities that together establish the style of Objective C programming used by most other Swarm libraries. Swarm defines its own superclasses and programming rules for almost all objects defined in its libraries. The most basic of these superclasses and programming rules are provided by the defobj library.
Even though Swarm relies heavily on the version of the Objective C language implemented by the GNU C Compiler, its use of Objective C is restricted almost entirely to the core features of the language itself, and does not extend to other classes or object libraries implemented in Objective C. It defines alternate versions even for most services provided by class "Object," which is ordinarily the superclass of all Objective C user classes.
Writers of Swarm applications normally see the most basic support of the defobj library only through the SwarmObject superclass defined in the swarmobject library. That library inherits from the more basic classes defined in defobj. The versions in defobj supply a greater range of more advanced usages which are used internally by some of the core Swarm libraries.
Generally speaking, programmers need not be concerned with the more sophisticated forms of defobj capabilities unless they are writing libraries for wider use, or want to take advantage of some of the special optimization capabilities which the defobj forms provide.
Following are key aspects of the defobj library with which every Swarm programmer should have some familiarity. (.. Currently these are all temporary links. Typically they go to an available section of the reference docs, if available. These will be replaced by references to future sections of the Usage Guide documentation.)