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, 10 May 2004 23:34:52 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87brkwc6f7.fsf@zagadka.ping.de> References: <16486.52591.672130.224861@localhost.localdomain> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084225215 18455 80.91.224.253 (10 May 2004 21:40:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 21:40:15 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 10 23:39:40 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 1BNIUt-0004Su-00 for ; Mon, 10 May 2004 23:39:39 +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 1BNISq-0003AZ-Up for guile-devel@m.gmane.org; Mon, 10 May 2004 17:37:32 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNIR8-0002bR-O1 for guile-devel@gnu.org; Mon, 10 May 2004 17:35:46 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNIQY-0002Nr-El for guile-devel@gnu.org; Mon, 10 May 2004 17:35:43 -0400 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNIQI-0002HH-9u for guile-devel@gnu.org; Mon, 10 May 2004 17:34:54 -0400 Original-Received: from dialin.speedway16.dip33.dokom.de ([195.253.16.33] helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 1BNISv-0007qz-00 for guile-devel@gnu.org; Mon, 10 May 2004 23:37:37 +0200 Original-Received: (qmail 8264 invoked by uid 1000); 10 May 2004 21:34:52 -0000 Original-To: hanwen@xs4all.nl In-Reply-To: <16486.52591.672130.224861@localhost.localdomain> (Han-Wen Nienhuys's message of "Sun, 28 Mar 2004 15:04:47 +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:3695 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3695 Han-Wen Nienhuys writes: > I've added the stricter typechecking code to the SCM_UNPACK macro in > CVS HEAD. It caught a few glitches in goops.h and backtrace.h , which > I corrected. Thanks! > I propose that the old > > DEBUG_TYPING_STRICTNESS==2 > > is removed, as it provides little extra strictness. Hmm, I don't agree. That setting is much stricter than the default one: Guile itself has many places that would need to be fixed for STRICTNESS == 2. For example, code like SCM x; if (x == SCM_EOL) ... does not compile with STRICTNESS == 2, and it is indeed not completely correct. (It should be SCM_EQ_P (x, SCM_EOL) or SCM_NULLP (x).) It would be a nice little (?) project to make Guile compile with STRICTNESS == 2. Some places, like switch (ISYMNUM (SCM_CAR (x))) { case (ISYMNUM (SCM_IM_AND)): in eval.c might be hard to fix, tho. > Also, I think that DEBUG_TYPING_STRICTNESS==0 should go too. The code > contained a thinko (leading to loads of compile errors). This > suggests that the code has never been tested since its inception a few > years ago. Can you elaborate? Guile itself compiles fine with STRICTNESS==0. Indeed, this strictness level offers no type checking. When I say "type checking" what really mean is that the compiler checks whether the user only uses SCM values in the way we want it to, like, no direct arithmetic, no direct use in conditional tests, only direct assignment. -- 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