unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Xinglu Chen <public@yoctocell.xyz>
Cc: 50614@debbugs.gnu.org,
	Liliana Marie Prikler <liliana.prikler@gmail.com>,
	Sarah Morgensen <iskarian@mgsn.dev>
Subject: [bug#50614] [PATCH core-updates] build: utils: Add ‘optional’ macro.
Date: Mon, 20 Sep 2021 13:03:34 +0200	[thread overview]
Message-ID: <871r5jh5kp.fsf_-_@gmail.com> (raw)
In-Reply-To: <ccbe07b719e498438a8f610cffa9ba274f6d608d.1632059166.git.public@yoctocell.xyz> (Xinglu Chen's message of "Sun, 19 Sep 2021 15:50:41 +0200")

Hi,

On Sun, 19 Sep 2021 at 15:50, Xinglu Chen <public@yoctocell.xyz> wrote:

> +@lisp
> +(if @var{test}
> +    (list @var{consequent} @dots{})
> +    '())
> +@end lisp

[...]

> +@lisp
> +(arguments
> + `(#:configure-flags (list "--localstatedir=/var"
> +                           "--sysconfdir=/etc"
> +                           ,@@(list-when (hurd-target?) "--with-courage"))))
> +@end lisp

Personally, I am not convinced it helps the readibility.  But that’s a
matter of taste. :-)

My concern is about the coherence.  First, ’list-unless’ is also
required by a similar pattern, see for instance:

--8<---------------cut here---------------start------------->8---
gnu/packages/guile.scm:162:             ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
--8<---------------cut here---------------end--------------->8---

And second, these 2 patterns ’list-when’ and ’list-unless’ are used in
by many files, see guix/build-system, guix/import, guix/describe,
gnu/packages, gnu/system, gnu/services files.  For the oneline pattern:
“ag --scheme '@\(if' | grep '()'”.  All should be replaced; which
implies a world-rebuild I guess.

Well, all in all, I am not convinced that all this work is worth for a
small debatable readibility improvement. :-)

All the best,
simon




      parent reply	other threads:[~2021-09-20 11:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16  7:11 [bug#50614] [PATCH core-updates] build: utils: Add ‘optional’ macro Xinglu Chen
2021-09-16 16:21 ` Liliana Marie Prikler
2021-09-17  0:37 ` Sarah Morgensen
2021-09-17  8:26 ` [bug#50614] [PATCH] build: utils: Add ‘list-when’ macro Xinglu Chen
2021-09-17 17:55   ` Liliana Marie Prikler
2021-09-17 19:15     ` Sarah Morgensen
2021-09-17 19:31       ` Liliana Marie Prikler
2021-09-18 14:41     ` Maxime Devos
2021-09-19 13:38     ` Xinglu Chen
2021-09-17 19:19   ` Sarah Morgensen
2021-09-19 13:41     ` Xinglu Chen
2021-09-19 13:50   ` [bug#50614] [PATCH core-updates v2] " Xinglu Chen
2021-09-19 14:35     ` Maxime Devos
2021-09-20 11:03     ` zimoun [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://guix.gnu.org/

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

  git send-email \
    --in-reply-to=871r5jh5kp.fsf_-_@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=50614@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    --cc=liliana.prikler@gmail.com \
    --cc=public@yoctocell.xyz \
    /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).