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

Re: Messing with the type heirarchy

Thread Previous | Thread Next
From:
Luke Palmer
Date:
July 27, 2005 07:15
Subject:
Re: Messing with the type heirarchy
Message ID:
7ca3f01605072707145a5751d@mail.gmail.com
On 7/27/05, Ingo Blechschmidt <iblech@web.de> 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About