[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: |
Sat, 11 Nov 2023 12:27:19 +0000 |
On Sat, Nov 11, 2023 at 6:12 AM <tomas@tuxteam.de> wrote:
>
> On Sat, Nov 11, 2023 at 09:23:26AM +0800, Po Lu wrote:
> > Dmitry Gutov <dmitry@gutov.dev> writes:
> >
> > > Just to take this example, there are about 2 major bugs: 1) the list
> > > will come out reversed, 2) the code does XOR rather than subtraction.
> >
> > Hmm, reading its doc string, I think a more illustrative name for
> > cl-set-difference would be cl-set-complement. In this case, the second
> > loop can be removed.
>
> Yes, "difference" is, surprisingly, ambiguous.
I wouldn't say "ambiguous", but this page has a brief review of
different ways the operation is referred to in literature.
https://proofwiki.org/wiki/Definition:Set_Difference/Also_known_as
In programming languages "set difference" seems to be the
overwhelmingly established term
https://cplusplus.com/reference/algorithm/set_difference/
http://clhs.lisp.se/Body/f_set_di.htm
https://docs.python.org/3/library/stdtypes.html#set
https://ruby-doc.org/core-1.9.3/Array.html#method-i-2D
https://doc.rust-lang.org/std/collections/struct.HashSet.html#method.difference
> Your implementation is
> usually called "symmetric difference" to avoid that.
Correct.
- 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/11
- Re: What's missing in ELisp that makes people want to use cl-lib?, Richard Stallman, 2023/11/12
- Re: What's missing in ELisp that makes people want to use cl-lib?, Dmitry Gutov, 2023/11/10
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/10
- Re: What's missing in ELisp that makes people want to use cl-lib?, Dmitry Gutov, 2023/11/10
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/10
- Re: What's missing in ELisp that makes people want to use cl-lib?, tomas, 2023/11/11
- 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?, Michael Heerdegen, 2023/11/11
- 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?, Michael Heerdegen, 2023/11/12
- 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?, Michael Heerdegen, 2023/11/13
- Re: What's missing in ELisp that makes people want to use cl-lib?, João Távora, 2023/11/13
- Re: What's missing in ELisp that makes people want to use cl-lib?, Emanuel Berg, 2023/11/16
- 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
- Re: What's missing in ELisp that makes people want to use cl-lib?, Po Lu, 2023/11/09