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

Re: Another quick one: .as<ancestor>

Thread Previous
From:
Aaron Sherman
Date:
July 13, 2006 07:26
Subject:
Re: Another quick one: .as<ancestor>
Message ID:
1152800709.28796.624.camel@pps
On Wed, 2006-07-12 at 17:52 -0700, Larry Wall wrote:
> On Wed, Jul 12, 2006 at 12:51:57PM -0400, Aaron Sherman wrote:
> : I would assume that all classes automatically define:
> : 
> :  multi submethod *infix:<as> ($self: $?CLASS) { $self }
> 
> Hmm, "as" is really only intended for explicit type mutation (which
> can work either by role mixin or by new object construction).  It's
> not intended to give Perl a different "view" of an unmutated object.

Thanks. I think I got compile-time polymorphism confused with run-time
mutation. These are moose of vastly different colors.

-- 
Aaron Sherman <ajs@ajs.com>
Senior Systems Engineer and Toolsmith
"We had some good machines, but they don't work no more." -Shriekback



Thread Previous


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