develooper Front page | perl.perl6.language | Postings from July 2005

Re: Messing with the type heirarchy

Thread Previous | Thread Next
Luke Palmer
July 27, 2005 07:15
Re: Messing with the type heirarchy
Message ID:
On 7/27/05, Ingo Blechschmidt <> wrote:
> Luke Palmer wrote:
> >     role Complex
> >         does Object
> >         contains Num
> >     {...}
> I've probably misunderstood you, but...:
>     role Complex does Object {...}
>     Num does Complex;
>     # That should work and DWYM, right?

Supposing that you can actually do that, and that "Num does Complex"
gets executed at compile time.  I didn't know you could add "does"
declarations to classes referring to other classes (rather than making
the class object do a metaclass role... though I admit that that would
only be warranted by a pretty bizarre situation).

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About