Next: Messages in Smalltalk
Up: Programming Language Support
Previous: Virtuals in Simula
The virtual mechanism in Beta [14] is a generalization
of the virtual mechanism in Simula. There are several dimensions
of generalization. First, it is possible to have virtual
patterns, where a pattern can be used to model procedures as well
as classes.
Second, a virtual pattern in a pattern P may be further bound in a chain of
subpatterns of P. If, e.g., P2 is a subpattern of P1
which again is a subpattern of
P, a virtual in P may get contributions from additional bindings in
P1 as well as from P2.
In the imperative part (the statement part) of a virtual pattern it
is possible to
use the keyword inner to define how the imperatives in the virtual
pattern should be combined with the imperatives in further bindings
of the pattern.
Third, it is possible to control whether a binding of a virtual
in a pattern is a final binding in contrast to still being open.
Regarded as open points, virtuals in Beta are not much more general
than those in Simula. The basic problem is still that open points
simulated via virtual patterns are closed too early relatively
to the execution time of the program. As for Simula,
we claim that Beta does not provide mechanisms that allows
simulation of open points. It is, however, worth noticing that the
binding of an ``open point'' in Beta can be a combination of several
contributions from a chain of subclasses. (This supports
our notion of multiple bindings of open points, as discussed
in section 1 and 3 of this paper.)
In Beta the combination is
programmed explicitly via the use of inner.
Kurt Noermark
Wed Mar 6 09:44:24 MET 1996