If you are worried about that, you can either use condition-case to
catch the 'no-next-method signal, or your subclass can implement the
no-next-method method (which would not call call-next-method), and you
would be robust to any such change.
Though, I don't really understand the problem. Changing libraries
breaks things all the time regardless of language. Can you provide a
concrete example of something that is unique to call-next-method?
I also think David is probably more qualified to talk about CLOS
philosophy than myself. I use EIEIO is a very C++ sort of way.
Pierre Lorenzon wrote:
> Next question is : when can `call-next-method' be safely used ?
> Imagine someone providing a packages of classes fitting certain
> specifications. And imagine you want simply to develop classes
> inheriting from classes of the package. If call-next-method is
> used in the derived classes there is something unstable. If the
> one who provided the classes package changes the implementation
> still fitting the specifications, everything can be broken if,
> for instance call-next-method are used in the new
> implementation. Recursive uses of call-next-method can appear
> and as I pointed it it might be brake everything. You can for
> instance get a no next method error, even if the class as a
> parent class. It is absolutely not comfortable ! I cannot
> believe that details of the implementation might be part of the
> Hence, my answer to the above question "when can
> call-next-method be safely used" would be NEVER it is too
> DANGEROUS !
> Anyway, the point might be that I did not understood CLOS
> philosophy and have to think again how things I wnat to
> implement might be implemented in CLOS !
> From: David
> Engster <deng@...> Subject: Re: [CEDET-devel] Fw:
> eieio call-next-method ? Date: Thu, 19 Nov 2009 22:38:14 +0100
>> Pierre Lorenzon <devel@...> writes:
>>> From: David Engster <deng@...>
>>>> I'm not Eric, but I'll try to answer anyway. ;-)
>>>> Pierre Lorenzon <devel@...> writes:
>>>>> it was not clear for me how call-next-method should act. In my mind,
>>>>> it must be something like super in java or c++ or parent in php.
>>>> No, CLOS is fundamentally different from OO in languages like Java, C++
>>>> or PHP. 'call-next-method' calls the next most specific method, and that
>>>> depends on how the method was invoked.
>>> 1. At this point, eieio documentation is not really precise
>>>>>> -- INFO
>>> Inside a method, calls the next available method up the
>>> inheritance tree for the given object. This is different than
>>>>>> -- End INFO
>>> inheritance tree sounds to me like something static not
>>> influenced by the way the method is called.
>> I agree, this should be changed. While you can mimic the hierarchical OO
>> from C++/Java with EIEIO, it just doesn't fit and leads to confusion.
>>> 2. A super or parent operator could easily implemented in
>>> eieio as I suggested and I personnally think that it could
>>> be useful.
>> In CLOS, methods do not "belong" to classes. While for simple examples,
>> something like 'A.method()' and '(method A)' look awfully alike, there
>> is a fundamental difference between those two, and it becomes very
>> obvious when you take a look at how multiple inheritance works in
>> CLOS. It's really just a logical extension of method specialization
>> ('(method A B)'), and this is only possible because you don't have to
>> care to which class a method "belongs"; methods are specialized,
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> Cedet-devel mailing list