[q-lang-users] Types and multiple inheritance
Brought to you by:
agraef
From: John.Cowan <jc...@re...> - 2005-06-27 14:13:48
|
As I understand it, variable references with a type guard T match only expressions whose operators are declared in the type declaration for T or inherited from T's supertype, if any. Since there is no state involved with types, it's not clear to me why types aren't permitted to inherit from multiple supertypes. The diamond inheritance problem would be trivial in such a situation, since one "nil" is as good as another. I have no particular use cases for this, but the restriction to a single supertype seems arbitrary and un-Q-ish. -- Values of beeta will give rise to dom! John Cowan (5th/6th edition 'mv' said this if you tried http://www.ccil.org/~cowan to rename '.' or '..' entries; see jc...@re... http://cm.bell-labs.com/cm/cs/who/dmr/odd.html) |