> -----Original Message-----
> From: chromatic [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 06 May, 2004 04:36 PM
> To: Austin Hastings
> Cc: Perl6 Language List
> Subject: RE: is rw trait's effect on signature
>
>
> On Thu, 2004-05-06 at 13:27, Austin Hastings wrote:
>
> > 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?
>
> I agree with his reasoning.  You need some sort of context to
> determine whether bark() is a noun or a verb -- that'd be the
> name of the class (or the role, in my scheme).

IMO, "Mom's rule" applies in this case.

>
> Trying to infer which role might apply may be nice in some
> cases, but as a general matter of policy it seems pretty
> vague and corner-casey.  I'm comfortable saying "if you
> don't mark 'does' and you don't inherit, the compiler
> won't guess that you do."

Then in your example:

> 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)

The class 'Eh' "does A but does not inherit", did you mean:

class Eh {
  method A1
  method A2
  method A3
}

or did you mean

class A {...}
class Eh {
  does A;
}

instead?  I had thought that C<does CLASS> (class implicitly= role) had been
rejected.

=Austin


Reply via email to