Next: Tcl
Up: Software ingredients
Previous: Software ingredients

Objective C

The primary language to represent mathematical objects (as experimental object of study) is Objective C [1, 2]. The choice of an object-oriented language can be justified by the fidelity with which these languages mirror the hierarchical nature of mathematical structure. However the choice of the object-oriented language is a subject of debate.

In contrast to its better known brother C++, Objective C offers a genuine run-time system that allows new classes or new methods to be defined during a running session [1]. This feature will be invoked often in the ensuing discussion so that the wisdom of our decision will be hopefully established.

Oorange comes with over 200 Objective C classes. The majority of them at this time are related to infrastructure functions. Many of these classes will be introduced in the discussions of the specific components below. An increasing number of more mathematically oriented classes are also in the process of construction. See section 4.1 for a discussion of two of the most useful foundation classes.

Objective C offers an alternative to subclassing via the use of protocols. A protocol is a simply a set of method declarations; any class can choose to implement any protocol. For example, Oorange uses protocols to define animation, archiving, inspection, and 3D geometry behavior. Participation in the corresponding infrastructure service is then independent of class hierarchy.

There are also provided with Oorange a wide set of C libraries of functions supporting mathematical experiments. These are provided as functions rather than objects in the interests of performance; some of these have object analogs when ease of programming is more importance than raw performance.


Copyright © 1997 Sonderforschungsbereich 288, Differential Geometry and Quantum Physics, TU-Berlin