The present invention provides a method and apparatus by which functions
may be derived from other functions in a programming language. A function
is essentially processed as a class, except that the object is
automatically destructed after the final line of code is executed. In one
or more embodiments of the present invention, a function has the ability
to inherit from a superfunction. Inheritance in this context means that
all functions in the hierarchy execute in order from the lowest level
superfunction to the derived function invoked by the calling statement.
Further, the derived function has access to all nonprivate methods and
variables defined in the superfunctions. All functions in the hierarchy
remain instantiated until the derived function has executed. At this
point, the functions are destructed in reverse hierarchical order. If a
function in the hierarchy enters an error condition, the execution
process is halted.