next up previous
Next: Virtuals in Beta Up: Programming Language Support Previous: Programming Language Support

Virtuals in Simula

  In Simula [7] it is possible to define procedures as virtuals. Virtual procedures may be full procedure definitions, or they may consist only of a procedure head. A virtual procedure definition in a class C may be redefined in full detail in a subclass of C. Let us, as an example, assume that the head of a procedure P is declared as virtual in the class C and that P is defined in full details in C', which is a subclass of C. A call of the virtually declared procedure P in a C' object, say in a procedure located in the class C, may be understood as an open point, the binding of which is supplied in C'. It is possible to simulate default bindings of open points in Simula by letting the virtual procedure definition be a full procedure definition, not just a procedure head.

Simula is a compiled language in the tradition of Algol. This implies that the open points defined by the call of virtual procedures are bound definitively during the compilation process. This is against the spirit of open points, and it leads to the conclusion that Simula virtuals cannot be used to simulate open points. As discussed in section 3, it is difficult to obtain a late binding of open points in languages that emphasize compile time bindings.

Kurt Noermark
Wed Mar 6 09:44:24 MET 1996