A monotonic superclass linearization for Dylan

Kim Barrett, B. Cassels, Paul Haahr, D. A. Moon, Keith Playford, P. T. Withington
1996
1 reference

Abstract

Object-oriented languages with multiple inheritance and automatic conflict resolution typically use a linearization of superclasses to determine which version of a property to inherit when several superclasses provide definitions. Recent work has defined several desirable characteristics for linearizations, the most important being monotonicity, which prohibits inherited properties from skipping over direct superclasses. Combined with Dylan's sealing mechanism, a monotonic linearization enables some compile-time method selection that would otherwise be impossible in the absence of a closed-world assumption.The Dylan linearization is monotonic, easily described, strictly observes local precedence order, and produces the same ordering as CLOS when that is monotonic. We present an implementation based on merging and a survey of class heterarchies from several large programs, analyzing where commonly used linearizations differ.

1 repository
1 reference

Code References

python/cpython
1 file
Doc/howto/mro.rst
1
L668 https://doi.org/10.1145/236337.236343
Link copied to clipboard!