[Top][All Lists]

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

Re: Generic functions: Specializers like `or' or `memq'?

From: Eric Abrahamsen
Subject: Re: Generic functions: Specializers like `or' or `memq'?
Date: Wed, 03 Nov 2021 14:32:27 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Heerdegen <> writes:

> Philip Kaludercic <> writes:
>> I haven't tried it myself, but it seems like you would have to use
>> cl-generic-generalizers (see cl-generic.el) to do so.
> Yes, it should be doable.  I find it a bit suspicious that this is not
> already available.

My understanding is that these more computationally-intensive
generalizers have the potential to seriously slow down method funcalls,
and so we're sort of gently discouraged from doing that. Obviously once
you've got this tool you're bound to try to use it everywhere, but I
think in general it's supposed to work better to move tightly-focused
generalization into a `cond' inside the method body, or what have you.

Is anyone else's brain incapable of maintaining the distinction between
"specializer" and "generalizer"? I cannot remember which is which, or
exactly how they differ, and its one of the major obstacles to me
actually reading and understanding cl-generic.el.


reply via email to

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