Object-Oriented Multi-Methods in Cecil
Craig Chambers
Multiple dispatching provides increased expressive power over single
dispatching by guiding method lookup using the values of all arguments
instead of only the receiver. However, existing languages with
multiple dispatching do not encourage the data- abstraction-oriented
programming style that is encouraged by traditional single-dispatching
languages; instead existing multiple-dispatching languages tend to
foster a function- oriented programming style organized around generic
functions. We propose an alternative view of multiple dispatching that
is intended to promote a data-abstraction-oriented programming
style. Instead of viewing a multi-method as 'outside' of all
objects, we view a multi-method as 'inside' the objects for which
the multi-method applies (on which it dispatches). Because objects are
closely connected to the multi-methods implementing their operations,
the internals of an object can be encapsulated by being accessible
only to the closely-connected multi-methods. We are exploring this
object-oriented view of multi-methods in the context of a new
programming language named Cecil.
ECOOP'92 Conference Proceedings, Utrecht, The Netherlands, July, 1992.
To get the PostScript file, click
here.
Cecil/Vortex
Project