help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching no generic method in EIEIO


From: Phillip Lord
Subject: Re: Catching no generic method in EIEIO
Date: Thu, 26 May 2016 16:07:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> The last form crashes -- I could, of course, implement this using
>> defmethod on Two, but I want to this for any method.
>
>     (defmethod ((o t))
>       ...)
>
> should do the trick.

Didn't know you could do that, but it's not what I wanted. It implements
the method for all objects. Where was what I wanted was to implement all
methods on one object (or class).

Not that it matters now, as I have realised I was doing the wrong thing
anyway, that inheritance will do what I need.

> PS: Of course, I also recommend you switch to cl-generic
> (i.e. use (cl-defmethod ...)).  It's more featureful and much faster.

I'm going to fix all that when I port everything to emacs-25. I'm just
waiting till that hits the shelf.

Phil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]