Feature. Forester 3.0 › Experimental support for objects [00EY]

To facilitate the development of extensible macro libraries for diagramming and other tasks, Forester 3.0 introduces experimental support for objects — which should be thought of as combination of records/structs, closures, and general recursion. An object is created like so:

\def\my-object{
  \object[self]{
    [method1]{
      the implementation of this method
    }
    [method2]{
      the implementation of another method
      \self#method1
    }
  }
}

The variable self is explicitly bound, and can be bound to any name you like. Methods currently are not allowed to take any arguments, but this may change in the future. A primitive form of inheritance is supported, using \patch:

\patch{\my-object}[self]{
  [method1]{
    \self/super#method1
    some further code
  }
}

The support for objects in Forester 3.0 is extremely experimental and preliminary: users are discouraged from relying on it.