From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.lisp.guile.devel Subject: Re: truth of %nil Date: Sun, 30 Aug 2009 18:01:48 -0400 Message-ID: References: <87k52uvhnt.fsf@arudy.ossau.uklinux.net> <20090702142823.GA1401@fibril.netris.org> <877hyqk8bx.fsf@arudy.ossau.uklinux.net> <20090703153218.GA1382@fibril.netris.org> <20090705024135.GA2363@fibril.netris.org> <20090707111406.GA1388@fibril.netris.org> <87iqg5y2o8.fsf@arudy.ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251669740 19935 80.91.229.12 (30 Aug 2009 22:02:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Aug 2009 22:02:20 +0000 (UTC) Cc: Andy Wingo , Mark H Weaver , guile-devel To: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Aug 31 00:02:12 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 1MhsTT-0008IL-HG for guile-devel@m.gmane.org; Mon, 31 Aug 2009 00:02:11 +0200 Original-Received: from localhost ([127.0.0.1]:38812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhsTS-00044B-D5 for guile-devel@m.gmane.org; Sun, 30 Aug 2009 18:02:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhsTM-00043u-Vy for guile-devel@gnu.org; Sun, 30 Aug 2009 18:02:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhsTI-00043h-Cy for guile-devel@gnu.org; Sun, 30 Aug 2009 18:02:04 -0400 Original-Received: from [199.232.76.173] (port=51193 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhsTI-00043e-9Y for guile-devel@gnu.org; Sun, 30 Aug 2009 18:02:00 -0400 Original-Received: from splat.raeburn.org ([69.25.196.39]:35070 helo=raeburn.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MhsTA-0001Hc-5Y for guile-devel@gnu.org; Sun, 30 Aug 2009 18:01:59 -0400 Original-Received: from [10.0.0.172] (squish.raeburn.org [10.0.0.172]) by raeburn.org (8.14.3/8.14.1) with ESMTP id n7UM1mS3026790; Sun, 30 Aug 2009 18:01:48 -0400 (EDT) In-Reply-To: <87iqg5y2o8.fsf@arudy.ossau.uklinux.net> X-Mailer: Apple Mail (2.936) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:9216 Archived-At: On Aug 30, 2009, at 07:13, Neil Jerram wrote: > Mark H Weaver writes: > This numbering has the nice properties that 0 is #f. > Just to be clear: will this mean that (SCM_BOOL_F == 0) ? As things > stand I don't think it will, because SCM_MAKIFLAG shifts and adds > 0x04. > > Just checking this because Ludovic said recently that (SCM_BOOL_F == > 0) would have nice properties for BDW-GC. Was that in list email? Maybe I overlooked it. Having all-bits-zero be a valid object would make some things easier in my guile-emacs work too, but could cause other problems as well. In Emacs all-bits-zero is now integer-zero, and in some places Lisp_Object variables are used or made visible to GC before being explicitly set, so I have to set them. In guile-emacs, I can check in key places (like 'cons', or the 'EQ' macro) for all-bits-zero and flag an error, or in certain cases patch over the problem temporarily. While the integration is still minimal, I suppose SCM_BOOL_F shouldn't be showing up in elisp processing, so that still works, but if it gets moved further along as I'm hoping, that could change. Having the default C initializer change from one valid value to another between Emacs and Guile-Emacs could make the bugs much more subtle. I kind of assumed that making all-bits-zero an invalid value was a conscious choice by the Guile (or SCM?) designers which wasn't likely to be revisited. It is, after all, a fairly easy way of highlighting a certain class of uninitialized-value problems -- choosing strict checking and debugging over letting the programmer be lazy. I think I'm mildly in favor of keeping all-bits-zero as an invalid representation. But, if it's a huge win for BDW-GC, maybe it's worth it. Ken