> -----Original Message----- > From: chromatic [mailto:[EMAIL PROTECTED] > > 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. >
I think we had this discussion a year or two ago, and Damian was opposed to the notion that providing the correct methods was equivalent to providing the interface or belonging to the class. His reasoning involved Dog and Tree both sharing grow, bark, etc. Perhaps he could re-explain his reasoning? =Austin