Re: [cedet-eieio] call-next-method invocation order
Brought to you by:
zappo
From: Frank <som...@gm...> - 2010-07-19 03:13:55
|
Eric M. Ludlam schrieb: > On 07/18/2010 07:16 PM, Jan Moringen wrote: > >>> Well it's kinda a complex example but the point why I bother you guys >>> with it is if I run this example on Allegro CL I get a different >>> result; >>> BTW if I add :method-invocation-order :depth-first to class derived2 I >>> get the same result as on Allegro CL; >> >> >> EIEIO has three linearization methods: depth-first, breadth-first and c3 >> (see [1]). The default is breadth-first search which can reach base >> before derived1, as your td2 example shows, since paths from derived3 >> have length 2 in both cases. The method used in CLOS (and therefore >> probably in Allegro CL) is different from all three and also described >> in [1]. >> >> In many cases, even complex hierarchies, the c3 linearization mentioned >> in [1] does the right thing. Your example should work with c3 >> linearization. It can be used in EIEIO >> with :method-invocation-order :c3. >> >>> As I'm not an expert in CL I'll leave it up to you guys what to do >>> with it; >> >> >> Maybe the documentation can be improved. > > > I was re-writing bits of the doc today based on the first question > when I noticed that :c3 wasn't there. Then I noticed the doc didn't > say what the default was. > > So I tried making :c3 the default (thus solving some of these issues > from happening by default) and found that CEDET didn't build properly. > (Complaints of malformed hierarchies.) > > Things then stalled for me and I didn't have time to finish. If this > is going to be a common issue, I'd like to try and get this new > mechanism in as the default, but it may take a while. > > Eric Fair enough!! BTW c3 doesn't seem to be available in emacs 23.2.1 Well I still puzzle how to apply the class option :method-invocation-order properly. (1) Does it have to be defined for all classes in a tree; (2) or to the base class and the specified invocation order is then effective for all child classes which inherit from it (3) or to the some class and if an object of this class is created then the specified invocation order is effective as specified by this class? Thanks Frank |