Jonathan Lang writes:
> Larry Wall wrote:
> > Well, nothing much really supercedes the class.  Even traits have
> > to be requested by the class, and if you have an entirely different
> > metaclass, it's probably declared with a different keyword than
> > C<class>.  (But sure, multiple traits will have to applied in order
> > of declaration, and I don't doubt there will be ordering dependencies.)
> 
> My apologies; I'm apparently a bit weak on my object-oriented terminology.
>  I'm not quite sure what's being meant here by "metaclass", other than a
> vague concept that it's somehow similar to the relationship between logic
> and metalogic.  Also, I was under the impression that the writers of the
> "tTraits" paper that you referred us to disliked "mixins" largely because
> they _did_ use an order-of-precedence conflict resolution scheme; surely
> their concerns would apply equally well to what we're calling traits?  

I think metaclass is referring to the thing that knows how to associate
attributes with their corresponding objects, how do dispatch methods to
their corresponding code objects, and whatnot.

> > I think the normative way to supercede a class should be to
> > subclass it.  That's what OO is supposed to be all about, after all.
> > If we can keep that orthogonal to role composition, we stand a good
> > chance of being able to do a lot of what AOP claims to do without
> > the downsides of AOP's own slatheron approach.  Or more precisely,
> > we can resort to AOP-style wrappers where we really need them, and
> > avoid them where we don't.
> 
> As I don't know what AOP is, this is largely lost on me.  But I'm all for
> keeping various aspects of perl orthogonal to each other if it's
> reasonable to do so.  Likewise, my main concern isn't so much "how to
> supercede a class" as it is "how to keep a class from superceding a role
> that it doesn't know about".  

C<perldoc Aspect> does a pretty good job of introducing one to AOP, at
least the extent to which Perl is capable of it (which is quite a lot).

> > I'm probably spouting nonsense.  I just hope it's good-sounding
> > nonsense...
> 
> More importantly, it seems to be _useful_ nonsense.  I just hope that _my_
> nonsense is more useful than it is annoying.  :)

Luke

Reply via email to