[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's missing in ELisp that makes people want to use cl-lib?
From: |
Stefan Monnier |
Subject: |
Re: What's missing in ELisp that makes people want to use cl-lib? |
Date: |
Thu, 16 Nov 2023 21:44:24 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> But cl-defmethod with just one method resulting in a simple function
> definition in an experimental fact (evaluate (cl-defmethod abc () 345);
> then (cl-defmethod abc () 345) returns (lambda nil (progn 345))), so that
> must be faster, without any computation of applicable methods.
"one method" is necessary but not sufficient for this optimization.
This one method has to have no specializer (aka only the `t` specializer).
> The comment above the code you quoted mentions "generic functions with
> a single method"; maybe it was written before the above optimization
> was made.
No, that comment refers to the case where there's a single method but
with a non-t specializer, so we can't just always call that one method
without first testing that the arg matches the specializer.
Stefan
- Re: What's missing in ELisp that makes people want to use cl-lib?, (continued)
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/17
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?, Dmitry Gutov, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?,
Stefan Monnier <=
- Re: What's missing in ELisp that makes people want to use cl-lib?, Dmitry Gutov, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?, Eli Zaretskii, 2023/11/17
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/17
- Re: What's missing in ELisp that makes people want to use cl-lib?, Eli Zaretskii, 2023/11/17
- Re: What's missing in ELisp that makes people want to use cl-lib?, Stefan Monnier, 2023/11/17
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/18
- Re: What's missing in ELisp that makes people want to use cl-lib?, Augusto Stoffel, 2023/11/20
- Re: What's missing in ELisp that makes people want to use cl-lib?, Gerd Möllmann, 2023/11/17
- PCL [Re: What's missing in ELisp that makes people want to use cl-lib?, Madhu, 2023/11/20
- Re: PCL [Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/20