From: Yuri Khan <yuri.v.khan@gmail.com>
To: emacs-tangents@gnu.org
Subject: Re: [External] : Re: Shrinking the C core
Date: Sun, 17 Sep 2023 21:34:24 +0700 [thread overview]
Message-ID: <CAP_d_8UYw-N12MG=6Kmhj0WGSHLjvvQOp4mG16ktsxOyH9Pd9A@mail.gmail.com> (raw)
In-Reply-To: <87h6ntcdt5.fsf@dataswamp.org>
On Sun, 17 Sept 2023 at 17:46, Emanuel Berg <incal@dataswamp.org> wrote:
> For example, (+ ...), (- ...) etc are preferable to
> (arithmetic :operation 'addition ...),
> (arithmetic :operation 'subtraction ...) etc.
Let’s reframe that in more real-life examples. What is preferable and why:
1. a couple of functions
a. ‘(my-sort-by SEQ LESSP)’ where LESSP is a function accepting two
elements X and Y and returning ‘t’ when X should be sorted before Y,
and
b. ‘(my-sort-on SEQ KEY)’ where KEY is a function accepting an
element X and returning a number such that sorting by that number
yields the desired order; or
2. a single function that could be called as ‘(my-sort SEQ :by LESSP)’
or ‘(my-sort SEQ :key KEY)’, with the same semantics as above?
Does your answer change if we want to extend the API to also support
sorting in descending order? If it does, how?
next prev parent reply other threads:[~2023-09-17 14:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AM9PR09MB4977F8809CAACC854107D60596F0A@AM9PR09MB4977.eurprd09.prod.outlook.com>
2023-09-13 14:46 ` [External] : Re: Shrinking the C core Drew Adams
2023-09-14 12:09 ` Arthur Miller
2023-09-15 16:17 ` Emanuel Berg
2023-09-15 20:04 ` Drew Adams
2023-09-15 20:21 ` Emanuel Berg
2023-09-16 20:55 ` Drew Adams
2023-09-17 10:08 ` Emanuel Berg
2023-09-17 14:34 ` Yuri Khan [this message]
2023-09-17 23:14 ` Emanuel Berg
2023-09-17 17:16 ` Drew Adams
2023-09-17 23:48 ` Emanuel Berg
[not found] <AM9PR09MB4977AE8A2555D914A8CB96ED96E1A@AM9PR09MB4977.eurprd09.prod.outlook.com>
[not found] ` <87ledwx7sh.fsf@yahoo.com>
[not found] ` <DB9PR09MB4986737ABB230BFCEB1AB9B596E0A@DB9PR09MB4986.eurprd09.prod.outlook.com>
[not found] ` <877cpfybhf.fsf@yahoo.com>
[not found] ` <AM9PR09MB4977C010362EBF83BCF3491C96E0A@AM9PR09MB4977.eurprd09.prod.outlook.com>
[not found] ` <873503y66i.fsf@yahoo.com>
[not found] ` <AM9PR09MB49779854134CDC2E4FB2AD2996E0A@AM9PR09MB4977.eurprd09.prod.outlook.com>
[not found] ` <E1qbX63-0003Ty-Rn@fencepost.gnu.org>
[not found] ` <E1qdgsR-0000j8-BN@fencepost.gnu.org>
[not found] ` <AM9PR09MB497757F8D921063E3D60D40C96EFA@AM9PR09MB4977.eurprd09.prod.outlook.com>
[not found] ` <ZPhih7q2ml8v6EfP@ACM>
[not found] ` <AM9PR09MB497758A94F012B506480CCE996EDA@AM9PR09MB4977.eurprd09.prod.outlook.com>
[not found] ` <SJ0PR10MB548849E1E781201B1E2A9AC3F3EDA@SJ0PR10MB5488.namprd10.prod.outlook.com>
[not found] ` <E1qfUyS-0006Wx-9e@fencepost.gnu.org>
[not found] ` <ZP+B/SleQ0CTPWd2@thyrsus.com>
[not found] ` <m2cyyoj9av.fsf@Pro.fritz.box>
2023-09-12 12:07 ` Eli Zaretskii
2023-09-12 12:16 ` Po Lu
2023-09-12 19:58 ` Arthur Miller
2023-09-13 14:39 ` Eli Zaretskii
2023-09-14 11:53 ` Arthur Miller
2023-09-14 13:36 ` Po Lu
[not found] ` <CALDnm50-__n48jSXe7WGXuT8O1YFm7QmqVzjgh-VUg5d_3ofpQ@mail.gmail.com>
[not found] ` <87fs3fesir.fsf@dataswamp.org>
2023-09-15 15:35 ` Drew Adams
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='CAP_d_8UYw-N12MG=6Kmhj0WGSHLjvvQOp4mG16ktsxOyH9Pd9A@mail.gmail.com' \
--to=yuri.v.khan@gmail.com \
--cc=emacs-tangents@gnu.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.
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).