From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] %nil-handling optimization and fixes v1 Date: Sun, 30 Aug 2009 14:01:44 -0400 Message-ID: <20090830180143.GA2484@fibril.netris.org> References: <20090709161043.GA2538@fibril.netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251655337 14993 80.91.229.12 (30 Aug 2009 18:02:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Aug 2009 18:02:17 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Aug 30 20:02: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 1Mhoj8-00085m-Ts for guile-devel@m.gmane.org; Sun, 30 Aug 2009 20:02:07 +0200 Original-Received: from localhost ([127.0.0.1]:41342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mhoj8-0006va-9O for guile-devel@m.gmane.org; Sun, 30 Aug 2009 14:02:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mhoj0-0006v5-My for guile-devel@gnu.org; Sun, 30 Aug 2009 14:01:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mhoiu-0006ui-5P for guile-devel@gnu.org; Sun, 30 Aug 2009 14:01:56 -0400 Original-Received: from [199.232.76.173] (port=57818 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mhoit-0006uf-LN for guile-devel@gnu.org; Sun, 30 Aug 2009 14:01:51 -0400 Original-Received: from world.peace.net ([204.107.200.8]:57915) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mhoit-0005J6-6N for guile-devel@gnu.org; Sun, 30 Aug 2009 14:01:51 -0400 Original-Received: from localhost ([127.0.0.1] helo=fibril.netris.org ident=hope5) by world.peace.net with esmtp (Exim 4.69) (envelope-from ) id 1Mhoin-0001GE-Fz; Sun, 30 Aug 2009 14:01:45 -0400 Content-Disposition: inline In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:9215 Archived-At: I wrote: > > I added the following macros, whose names explicitly state how %nil > > should be handled. See the comments in the patch for more information > > about these. > > > > scm_is_false_assume_not_lisp_nil scm_is_true_assume_not_lisp_nil > > scm_is_false_and_not_lisp_nil scm_is_true_or_lisp_nil > > scm_is_false_or_lisp_nil scm_is_true_and_not_lisp_nil > > > > scm_is_lisp_false scm_is_lisp_true > > > > scm_is_null_assume_not_lisp_nil > > scm_is_null_and_not_lisp_nil > > scm_is_null_or_lisp_nil > > > > scm_is_bool_and_not_lisp_nil > > scm_is_bool_or_lisp_nil Andy wrote: > These are terrible names. But they seem to be the best names for the > concepts we're trying to express. I don't understand all of them yet, > will wait for a review -- unless Neil takes care of that before I do ;-) I agree that the names are uncomfortably long. We could shorten them without much loss of clarity by replacing "lisp_nil" with "nil" and "and_not" with "not", yielding: scm_is_false_assume_not_nil scm_is_true_assume_not_nil scm_is_false_not_nil scm_is_true_or_nil scm_is_false_or_nil scm_is_true_not_nil scm_is_lisp_false scm_is_lisp_true scm_is_null_assume_not_nil scm_is_null_not_nil scm_is_null_or_nil scm_is_bool_not_nil scm_is_bool_or_nil I can still do this if y'all would prefer the shorter names. However, if we've all agreed that scm_is_null/false/true will treat %nil as both false and null (have we?), the longer names will rarely be needed. Are there any remaining objections to mapping scm_is_false/true/null as follows? scm_is_null --> scm_is_null_or_lisp_nil scm_is_false --> scm_is_false_or_lisp_nil scm_is_true --> scm_is_true_and_not_lisp_nil Mark