[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: |
João Távora |
Subject: |
Re: What's missing in ELisp that makes people want to use cl-lib? |
Date: |
Thu, 16 Nov 2023 16:03:00 +0000 |
On Thu, Nov 16, 2023 at 3:43 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> On 16/11/2023 16:36, Augusto Stoffel wrote:
> >> That breaks any sequence type based on lists. This is exactly the
> >> problem I was raising with too-many-generic interfaces, btw.
> > Good point. IMO you just can't have both lists and "types based on
> > lists" to work together properly; if we defined a method for
> > seq-difference on lists, the issue would be the same (I guess that's the
> > caveat you raised regarding Dmitri's patch).
>
> Actually, we might not allow custom sequences based on lists to begin
> with. E.g. if there are two definitions
>
> (cl-defmethod seq-length ((l (head :m6-sparse)))
>
> and
>
> (cl-defmethod seq-length ((l list))
>
> ...is there a well-defined ordering between them which would determine
> the one that will be used for (cons :m6-sparse nil)?
The former is more specific and kicks in first. So it's an implicit
interface already even if it not described anywhere (but it probably
is, I didn't check).
And then there's the :around, :before, etc methods. Those are perfectly
well defined.
> If not, the optimization proposed by Augusto should be quite valid. And
> whatever custom sequences are added later, should use cl-defstruct or
> similar.
Looking forward to see benchmarks (and maybe some unit tests) based
on the latest branch. If you can, please use my joaot/bench macro
it makes all this data easier to digest.
João
- Re: [External] : 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?, Emanuel Berg, 2023/11/12
- Re: What's missing in ELisp that makes people want to use cl-lib?, Augusto Stoffel, 2023/11/15
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/15
- Re: What's missing in ELisp that makes people want to use cl-lib?, Augusto Stoffel, 2023/11/15
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/15
- Re: What's missing in ELisp that makes people want to use cl-lib?, Augusto Stoffel, 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?, Dmitry Gutov, 2023/11/16
- Re: What's missing in ELisp that makes people want to use cl-lib?,
João Távora <=
- Re: What's missing in ELisp that makes people want to use cl-lib?, Emanuel Berg, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Eli Zaretskii, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Emanuel Berg, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Eli Zaretskii, 2023/11/11
- RE: [External] : Re: What's missing in ELisp that makes people want to use cl-lib?, Drew Adams, 2023/11/11
- RE: [External] : Re: What's missing in ELisp that makes people want to use cl-lib?, Drew Adams, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Emanuel Berg, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/11