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: Removal of SCM_UNBOUND Date: Sun, 16 Apr 2006 00:26:14 +0100 Message-ID: <87ejzys9nt.fsf@ossau.uklinux.net> References: <1145137262.8613.42.camel@localhost.localdomain> <66e540fe0604151503l5d648f10p7e997ced73e37137@mail.gmail.com> <66e540fe0604151506x230ebd10vd6d59fc243ce60b7@mail.gmail.com> <66e540fe0604151513h2c0f0290i1d26b1a5977c054c@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145143604 29742 80.91.229.2 (15 Apr 2006 23:26:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Apr 2006 23:26:44 +0000 (UTC) Cc: Clinton Ebadi , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Apr 16 01:26:40 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FUuA2-0006rA-AG for guile-devel@m.gmane.org; Sun, 16 Apr 2006 01:26:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUuA1-0006iW-O5 for guile-devel@m.gmane.org; Sat, 15 Apr 2006 19:26:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FUu9y-0006hG-U3 for guile-devel@gnu.org; Sat, 15 Apr 2006 19:26:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FUu9x-0006gE-U4 for guile-devel@gnu.org; Sat, 15 Apr 2006 19:26:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUu9x-0006g3-M6 for guile-devel@gnu.org; Sat, 15 Apr 2006 19:26:33 -0400 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FUuAG-0006Ux-Bn for guile-devel@gnu.org; Sat, 15 Apr 2006 19:26:52 -0400 Original-Received: from laruns (host86-129-134-171.range86-129.btcentralplus.com [86.129.134.171]) by mail3.uklinux.net (Postfix) with ESMTP id BCB5B409FBC; Sat, 15 Apr 2006 23:26:31 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id 070D96F70A; Sun, 16 Apr 2006 00:26:14 +0100 (BST) Original-To: djurfeldt@nada.kth.se In-Reply-To: <66e540fe0604151513h2c0f0290i1d26b1a5977c054c@mail.gmail.com> (Mikael Djurfeldt's message of "Sun, 16 Apr 2006 00:13:13 +0200") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) 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:5863 Archived-At: "Mikael Djurfeldt" writes: > While putting together my daugther's Easter egg, I suddenly realized > that the thing that mght bite you is that many parts of GOOPS is > written in Scheme so that, if this UNBOUND value is eqv? to > SCM_UNDEFINED, things go wrong as soon as any Scheme primitive, used > by GOOPS itself, happen to get this value passed in an optional > argument. > > I think there *are* instances like this so that making them eqv? > really does introduce a bug. But even if it doesn't right now, having > them eqv? seems likely to introduce future bugs. Just to check my understanding: I believe the existing SCM_UNBNDP macro, which is used in C code to check for the presence of an optional argument, expands to (x == SCM_UNDEFINED); I presume that SCM_UNBOUND is a distinct value (and somewhat confusingly unrelated to SCM_UNBNDP) used by GOOPS to indicate an unbound slot. Then, as Mikael says, bugs may be introduced where a Scheme primitive takes an optional argument and passes that argument on, untranslated, to code that uses that value to set or test a slot's value. That sounds unlikely, though. In my experience, I've never noticed SCM_UNDEFINED escaping onto the Scheme level, and all the primitive code that I can remember immediately translates SCM_UNDEFINED to some locally meaningful default value. Regards, Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel