From: "Ludovic Courtès" <ludo@gnu.org>
To: Brendan Tildesley <mail@brendan.scot>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: A better way to access records.
Date: Sat, 31 Oct 2020 23:01:07 +0100 [thread overview]
Message-ID: <87sg9urr6k.fsf@gnu.org> (raw)
In-Reply-To: <487cea17-061a-2cc9-6b3e-7b688114d158@brendan.scot> (Brendan Tildesley's message of "Fri, 30 Oct 2020 21:28:38 +1100")
Hi,
Brendan Tildesley <mail@brendan.scot> skribis:
> In the guix codebase, on many occasions there appear things like this:
>
> (match-lambda
> (($ <agetty-configuration> agetty tty term baud-rate auto-login
> login-program login-pause? eight-bits? no-reset? remote?
> flow-control?
> host no-issue? init-string no-clear? local-line extract-baud?
> skip-login? no-newline? login-options chroot hangup?
> keep-baud? timeout
> detect-case? wait-cr? no-hints? no-hostname? long-hostname?
> erase-characters kill-characters chdir delay nice extra-options)
> (list
> ....
This has officially been Bad Practice for a while. Instead, the
recommended approach is to use ‘match-record’ from (guix records).
There are examples of that primarily in (gnu services …).
Does that help?
Thanks,
Ludo’.
next prev parent reply other threads:[~2020-10-31 22:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 10:28 A better way to access records Brendan Tildesley
2020-10-30 11:04 ` Bengt Richter
2020-10-30 18:17 ` Taylan Kammer
2020-10-31 22:01 ` Ludovic Courtès [this message]
2020-11-13 11:24 ` Brendan Tildesley
-- strict thread matches above, loose matches on Subject: below --
2020-10-30 10:49 Leo Prikler
2020-10-30 10:59 ` Brendan Tildesley
2020-10-30 19:47 ` Danny Milosavljevic
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://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg9urr6k.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mail@brendan.scot \
/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/guix.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).