|
| From: | Dmitry Gutov |
| Subject: | Re: What's missing in ELisp that makes people want to use cl-lib? |
| Date: | Thu, 16 Nov 2023 01:25:53 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 15/11/2023 21:56, Gerd Möllmann wrote:
In the case that there is only 1 method, Emacs seems to arrange for that method function to be used as function definition of the generic function (I'm a bit simplifying here). So it avoids both using a discrimating functions, and an effective method function.
That makes a lot of sense indeed: since the function slot can be modified directly (and wouldn't break any inline caches, for example), why not do that when there's only one definition.
The only downside is that the performance characteristics of callers can change unexpectedly as more definitions arrive (which the authors of the caller code might not have tested for).
| [Prev in Thread] | Current Thread | [Next in Thread] |