Re: Roles as anonymous and/or closures

2005-04-26 Thread Luke Palmer
Juerd writes: > (And write classes ucfirst, please) > > > return $self but role { > > does role { ... } Nope, Aaron was right here, since you're not trying to mutate $self; you're just trying to return a new $self with other capabilities. > > It certainly seems very

Re: Roles as anonymous and/or closures

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 09:49, Juerd wrote: > > return $self but role { > > does role { ... } As I understood (please correct me if I'm wrong), the difference between "does" and "but" was that does modifies the existing object in-place, and does creates a copy with the new

Re: Roles as anonymous and/or closures

2005-04-26 Thread Abhijit Mahabal
On Tue, 26 Apr 2005, Aaron Sherman wrote: It also might be useful for roles to be able to delete members and methods from a class like so: role foo { has $.x; has not $.y; } But that brings up the issue of who has the final authority. In class compos

Re: Roles as anonymous and/or closures

2005-04-26 Thread Juerd
All IIRC/AFAIK: Aaron Sherman skribis 2005-04-26 9:25 (-0400): > method make ($self: $make, [EMAIL PROTECTED]) returns(car) { returns car; (And write classes ucfirst, please) > return $self but role { does role { ... } > It certainly seems very