From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: typechecking Date: Mon, 17 May 2004 20:31:24 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <8765auq51f.fsf@zagadka.ping.de> References: <16486.52591.672130.224861@localhost.localdomain> <87brkwc6f7.fsf@zagadka.ping.de> <16544.2271.454230.492574@localhost.localdomain> <40A5DFF2.80004@dirk-herrmanns-seiten.de> <16551.33946.660778.142166@localhost.localdomain> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084826994 18393 80.91.224.253 (17 May 2004 20:49:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 May 2004 20:49:54 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 17 22:49:38 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPp3J-0005Cr-00 for ; Mon, 17 May 2004 22:49:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPoiU-0001OY-Hk for guile-devel@m.gmane.org; Mon, 17 May 2004 16:28:06 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BPnVb-0004rA-I8 for guile-devel@gnu.org; Mon, 17 May 2004 15:10:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BPnDs-0000w2-Rk for guile-devel@gnu.org; Mon, 17 May 2004 14:52:57 -0400 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPmta-0006PU-RF for guile-devel@gnu.org; Mon, 17 May 2004 14:31:27 -0400 Original-Received: from dialin.speedway45.dip121.dokom.de ([195.138.45.121] helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 1BPmwK-0008TA-00 for guile-devel@gnu.org; Mon, 17 May 2004 20:34:17 +0200 Original-Received: (qmail 7172 invoked by uid 1000); 17 May 2004 18:31:24 -0000 Original-To: hanwen@xs4all.nl In-Reply-To: <16551.33946.660778.142166@localhost.localdomain> (Han-Wen Nienhuys's message of "Sun, 16 May 2004 17:11:22 +0200") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3730 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3730 Han-Wen Nienhuys writes: > that doesn't really answer my question. It seems to me that > > if (obj == gh_symbol2scm("bla")) > ... > > is safe. It does currently work, and will likely continue to work for a very long time. (Even with the strange nil/#f/() tryptich planned for getting Elisp into Guile.) However, for a proper abstract data type like SCM, it would be cleaner to use SCM_EQ_P. Setting DEBUG_TYPE_STRICTNESS to 2 will not allow direct comparisons. > Do I understand correctly that disallowing this is a side > effect of trying to disallow > > if (obj) > ... No, I don't think so. The two cases seem very different to me. "if (obj)" will never be correct since the SCM encoding that is considered false by C will never occur, and more importantly, SCM_BOOL_F is not false when seen directy by C. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel