From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.devel Subject: Re: Smart variables, dumb variables Date: Thu, 15 Aug 2002 22:25:21 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <20020815202521.GB9588@www> References: <20020814202831.GA7443@www> <877kittbdr.fsf@zagadka.ping.de> <20020814210634.GA7220@www> <871y91taen.fsf@zagadka.ping.de> <20020815080643.GA8225@www> <87hehwqdwr.fsf@zagadka.ping.de> <20020815172709.GA9304@www> <87y9b7q56j.fsf@zagadka.ping.de> <20020815200255.GA9588@www> <87n0rnq4am.fsf@zagadka.ping.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1029442339 16637 127.0.0.1 (15 Aug 2002 20:12:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 15 Aug 2002 20:12:19 +0000 (UTC) Cc: rm@fabula.de, tomas@fabula.de, guile-devel@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17fQyg-0004KE-00 for ; Thu, 15 Aug 2002 22:12:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fQzb-0002mM-00; Thu, 15 Aug 2002 16:13:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17fQzE-0002kK-00 for guile-devel@gnu.org; Thu, 15 Aug 2002 16:12:52 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17fQzC-0002k8-00 for guile-devel@gnu.org; Thu, 15 Aug 2002 16:12:51 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fQzC-0002jl-00 for guile-devel@gnu.org; Thu, 15 Aug 2002 16:12:50 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 510301049BF; Thu, 15 Aug 2002 22:25:21 +0200 (CEST) Original-To: Marius Vollmer Content-Disposition: inline In-Reply-To: <87n0rnq4am.fsf@zagadka.ping.de> User-Agent: Mutt/1.3.24i Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1102 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1102 On Thu, Aug 15, 2002 at 10:02:09PM +0200, Marius Vollmer wrote: > rm@fabula.de writes: > > > > Should it print # from the start? > > > > Since it actually _is_ a generic from the start, yes, i think it should. > > Ok, agreed. Objections? > > > Of course, what i'm really after is a test like 'generic? foo' so that > > i can write a macro that does what i think guile should do. Make 'foo' > > a generic iff it's not one allready. > > You can't really do that I think. You can't change a procedure into a > generic function. What you can do is change the value of a variable > to point to a new function, which is generic. But maybe that is what > you want. Excuse my slopy language - i was thinking more of the net result. So i guess my macro would have to save the original value (the one pointing to the procedure) and then, after a define-generic, issue a define method that rebinds the value to a generic method with a parameter signature of ''. Kind of clumsy. > There is no 'generic?' but you can maybe define it like so I couldn't find one (which i found astonishing as well). > (define (generic? obj) > (or (is-a? obj ) > (is-a? obj ))) Yes, i guess that would do the trick. Ralf : > > -- > 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