unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: Ricardo Wurmus <rekado@elephly.net>, 29745@debbugs.gnu.org
Subject: [bug#29745] [PATCH 0/3] Disallow phase returning <unspecified>.
Date: Mon, 18 Dec 2017 09:01:01 +0100	[thread overview]
Message-ID: <87zi6gxy6a.fsf@gnu.org> (raw)
In-Reply-To: <cu7wp1ldz5c.fsf@systemreboot.net> (Arun Isaac's message of "Sun, 17 Dec 2017 23:17:59 +0530")

Hello,

Arun Isaac <arunisaac@systemreboot.net> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> it ends up defining a notion of “true” that’s different from that of
>> Scheme (in Scheme, #f is the only false value; everything else is
>> true, including “the unspecified value”—see “Disjointness of types” in
>> the R5RS.)
>
> I agree. I don't think we should define a new notion of "true" that is
> different from that of Scheme.
>
> But, in that case, why do we explicitly add #t at the end of phases that
> return an unspecified value? Can we not drop this convention and simply
> accept unspecified values from phases as a success of that phase?
>
> The way it is right now, we add #t at the end of phases that return an
> unspecified value, but don't check for this anywhere. So, we have a lot
> of custom phases where people have forgotten to return #t. Patches 2 and
> 3 fix some of these, but I'm sure there are many more. Wouldn't it be
> simpler and more logical to accept unspecified values as "true" in line
> with Scheme's notion of "true"?

That’s a good question.  My take on it is that it’s clearer: the return
value of ‘substitute*’ for instance is unspecified, it’s not necessarily
*the* unspecified value.

I’m not opposed to changing things though.  For instance we could change
the return value of ‘substitute*’ to be #t on success; similarly for
‘install-file’.

What do people think?

Ludo’.

  reply	other threads:[~2017-12-18  8:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-16 23:12 [bug#29745] [PATCH 0/3] Disallow phase returning <unspecified> Arun Isaac
2017-12-16 23:16 ` [bug#29745] [PATCH 1/3] build: gnu-build-system: " Arun Isaac
2017-12-16 23:16   ` [bug#29745] [PATCH 2/3] build: gnu-build-system: Return #t from phases Arun Isaac
2017-12-16 23:16   ` [bug#29745] [PATCH 3/3] gnu: " Arun Isaac
2017-12-17  6:27 ` [bug#29745] [PATCH 0/3] Disallow phase returning <unspecified> Ricardo Wurmus
2017-12-17 16:55 ` Ludovic Courtès
2017-12-17 17:47   ` Arun Isaac
2017-12-18  8:01     ` Ludovic Courtès [this message]
2017-12-18  8:44       ` Ricardo Wurmus
2017-12-28 11:43         ` bug#29745: " Arun Isaac
2017-12-18  9:06       ` [bug#29745] " Arun Isaac
2017-12-19  8:38         ` Ludovic Courtès
2017-12-19 21:58           ` Mark H Weaver
2017-12-18  9:26       ` Andreas Enge
2017-12-17 18:14   ` Marius Bakke

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=87zi6gxy6a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=29745@debbugs.gnu.org \
    --cc=arunisaac@systemreboot.net \
    --cc=rekado@elephly.net \
    /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).