On Thu, 2004-05-06 at 11:24, Dan Sugalski wrote:
Well... sort of, but only because you've defined that for perl 6 classes automatically do themselves--you've conflated inheritance and interface. Which is fine, except that it falls down in the face of objects from classes that don't do that.
Given:
- class A, a superclass - class AB, a subclass of A - class Eh, a class that does A but does not inherit from it - subroutine signature foo(A some_object)
If the signature checker checks isa, you can't pass in Eh, even though its writer has guaranteed that its semantics match those of A.
If the signature checker checks does, you can pass in A, AB, or Eh, assuming that subclassing marks does on the subclass *or* that you fall back to checking isa if does fails.
Either will probably work, but you and I both agree there's a problem in that does and isa overlap somewhat. We disagree on the implications of that overlap, though.
It's a matter of perspective as much as anything else. And, I'll add again, I don't care which it is. Both ways have implications and limits, and either way is fine.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk