[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why Single Inheritance Restriction?
I would appreciate either the removal of the single inheritance restriction
[e.g. by allowing multiple PARENT clauses] or the addition of a rational of
why such a restriction is warrented.
My concern is that multiple inheritance has been found quite useful, while
simulating multiple inheritance using single inheritance is typically tedious
and error prone.
An example is an MI object system which uses records as instances (rooted at a
common ancestor w predicate instance?). I might desire a collection which is
Keyed (fields: index-type, key=?, element-type), Thread-Safe (field: mutex),
and Sorted (field: compare<?). Such a record object would answer #t to each
(and (instance? obj) (keyed? obj) (thread-safe? obj) (sorted? obj)) => #t
Supporting MI would allow innovation in the dispatching and surface syntax of
OO systems while allowing more portable instance representations. Precluding
MI leads to yet more "tagged vector" implementations and associated broken
[Note: Fast, constant-time subtype testing: