From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: truth of %nil Date: Mon, 29 Jun 2009 22:44:54 +0100 Message-ID: <87k52uvhnt.fsf@arudy.ossau.uklinux.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246311917 1902 80.91.229.12 (29 Jun 2009 21:45:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2009 21:45:17 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jun 29 23:45:10 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MLOf0-0007yG-11 for guile-devel@m.gmane.org; Mon, 29 Jun 2009 23:45:10 +0200 Original-Received: from localhost ([127.0.0.1]:56876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLOew-0004c7-CV for guile-devel@m.gmane.org; Mon, 29 Jun 2009 17:45:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLOet-0004c0-O2 for guile-devel@gnu.org; Mon, 29 Jun 2009 17:45:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLOeo-0004bm-BQ for guile-devel@gnu.org; Mon, 29 Jun 2009 17:45:02 -0400 Original-Received: from [199.232.76.173] (port=37679 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLOeo-0004bj-61 for guile-devel@gnu.org; Mon, 29 Jun 2009 17:44:58 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:42910) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MLOen-0004U5-9S for guile-devel@gnu.org; Mon, 29 Jun 2009 17:44:57 -0400 Original-Received: from arudy (host86-152-99-133.range86-152.btcentralplus.com [86.152.99.133]) by mail3.uklinux.net (Postfix) with ESMTP id F141F1F66BB; Mon, 29 Jun 2009 22:44:54 +0100 (BST) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 36F6638021; Mon, 29 Jun 2009 22:44:54 +0100 (BST) In-Reply-To: (Andy Wingo's message of "Mon\, 29 Jun 2009 23\:12\:11 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8802 Archived-At: Andy Wingo writes: > Hi all, > > Daniel came up with an interesting test case: > > scheme@(guile-user)> (if %nil 1 2) > 1 > > We could fix this transparently by changing scm_is_false in boolean.h > from: > > #define scm_is_false(x) scm_is_eq ((x), SCM_BOOL_F) > > to > > #define scm_is_false(x) (scm_is_eq ((x), SCM_BOOL_F) || SCM_NILP (x)) > > I'm not really sure if this is the right place for this to go, though. > It seems that it is. (Ideally the two values would differ by one bit > only, and we could mask that bit away and just have the one test.) What > do people think? > > Andy > -- > http://wingolog.org/ Seems wrong to me. In Scheme #f should be the only false value. What's the argument for %nil being false in Scheme code? Neil