2010-11-12

handling multi-inheritance interface clashes

11.10: adda/oop/multi-inherit:
. suppose 2 interfaces have the same subprogram name?
you can qualify it with type ownership,
eg, aTYPE`f;
or it can be implied by the call's other items:
it's the intersection of the types associated with
the subprogram, and all its operands;
eg, subprog"add is in types {number, string, multi-set}
int is a number,
beast is either in {number, behaviors};
so the type-intersection of (2 + beast)
is number, hence it eval's to (2+616) .

No comments:

Post a Comment