unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sam Steingold <sds@gnu.org>
To: emacs-devel@gnu.org, mattiase@acm.org
Subject: Re: lexicographic list comparison
Date: Mon, 12 Sep 2022 14:35:00 -0400	[thread overview]
Message-ID: <lzo7vkmoff.fsf@3c22fb11fdab.ant.amazon.com> (raw)
In-Reply-To: <CB0E511A-0746-42C3-A5BB-74CFFD33418C@acm.org> (mattiase@acm.org's message of "Mon, 12 Sep 2022 19:53:42 +0200")

> *  <znggvnfr@npz.bet> [2022-09-12 19:53:42 +0200]:
>
> 12 sep. 2022 kl. 16.45 skrev Sam Steingold <sds@gnu.org>:
>
>> okay, so, I suppose, you find the `lexicographic-compare-lists' from TS
>> useful, right?
>
> (What is TS in this context?)

TS=topic start (the initial message in the thread)

> I usually just copy-paste code from an older project of mine (who
> doesn't?) because that way I know that it works, how it works, what
> its performance is like, etc.

I abhor code copying.
If I find that I reuse a function, I put it into a library.

>> I certainly have no intention of comparing strings with numbers &c.
>> My question was about a list of _homogeneous_ lists, and comparing to,
>> say, lists of numbers, is done lexicographically based on number
>> comparison.
>
> We could certainly add comparison functions for lists, then ones for
> arrays,

nah, all sequences are compared the same way.

> then for hash tables, and so on.
> Or just write one that works for all built-in types and impose an
> ordering between objects of distinct types. It would be more useful
> (if harder to write).

I seriously doubt this could be useful.

-- 
Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113
https://lastingimpactpsychology.com https://steingoldpsychology.com
https://iris.org.il https://ij.org/ https://jij.org https://camera.org
Calculus has its limits.



      parent reply	other threads:[~2022-09-12 18:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 19:27 lexicographic list comparison Sam Steingold
2022-09-10  9:07 ` Mattias Engdegård
2022-09-10  9:22   ` Emanuel Berg
2022-09-10  9:26   ` tomas
2022-09-12 14:45   ` Sam Steingold
2022-09-12 17:53     ` mattiase
2022-09-12 18:31       ` Stefan Monnier
2022-09-12 18:41         ` Sam Steingold
2022-09-12 19:32           ` Stefan Monnier
2022-09-12 18:35       ` Sam Steingold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lzo7vkmoff.fsf@3c22fb11fdab.ant.amazon.com \
    --to=sds@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).