From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQqNB-0006Zq-Sd for guix-patches@gnu.org; Mon, 18 Dec 2017 03:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQqN8-0001fn-1X for guix-patches@gnu.org; Mon, 18 Dec 2017 03:02:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQqN7-0001fb-V4 for guix-patches@gnu.org; Mon, 18 Dec 2017 03:02:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eQqN7-0006dH-IN for guix-patches@gnu.org; Mon, 18 Dec 2017 03:02:01 -0500 Subject: [bug#29745] [PATCH 0/3] Disallow phase returning . Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20171216231242.12032-1-arunisaac@systemreboot.net> <87efnt9tvw.fsf@gnu.org> Date: Mon, 18 Dec 2017 09:01:01 +0100 In-Reply-To: (Arun Isaac's message of "Sun, 17 Dec 2017 23:17:59 +0530") Message-ID: <87zi6gxy6a.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac Cc: Ricardo Wurmus , 29745@debbugs.gnu.org Hello, Arun Isaac skribis: > Ludovic Court=C3=A8s writes: > >> it ends up defining a notion of =E2=80=9Ctrue=E2=80=9D that=E2=80=99s di= fferent from that of >> Scheme (in Scheme, #f is the only false value; everything else is >> true, including =E2=80=9Cthe unspecified value=E2=80=9D=E2=80=94see =E2= =80=9CDisjointness of types=E2=80=9D 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=E2=80=99s a good question. My take on it is that it=E2=80=99s clearer= : the return value of =E2=80=98substitute*=E2=80=99 for instance is unspecified, it=E2= =80=99s not necessarily *the* unspecified value. I=E2=80=99m not opposed to changing things though. For instance we could c= hange the return value of =E2=80=98substitute*=E2=80=99 to be #t on success; simi= larly for =E2=80=98install-file=E2=80=99. What do people think? Ludo=E2=80=99.