From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: MOP question Date: Tue, 23 Apr 2002 20:01:18 -0700 Sender: guile-user-admin@gnu.org Message-ID: References: <87it6tu9yz.fsf@dyn006239.shef.ac.uk> Reply-To: ttn@glug.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019617665 29016 127.0.0.1 (24 Apr 2002 03:07:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 24 Apr 2002 03:07:45 +0000 (UTC) Cc: guile-user@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 170D8C-0007Xm-00 for ; Wed, 24 Apr 2002 05:07:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 170D7T-00037z-00; Tue, 23 Apr 2002 23:06:59 -0400 Original-Received: from ca-crlsbd-u5-c4a-a-172.crlsca.adelphia.net ([24.48.214.172] helo=giblet) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 170D62-0002zv-00 for ; Tue, 23 Apr 2002 23:05:30 -0400 Original-Received: from ttn by giblet with local (Exim 3.33 #1 (Debian)) id 170D1y-00078y-00; Tue, 23 Apr 2002 20:01:18 -0700 Original-To: e.e.moore@sheffield.ac.uk In-Reply-To: <87it6tu9yz.fsf@dyn006239.shef.ac.uk> (message from Eric E Moore on Mon, 15 Apr 2002 00:38:44 +0100) Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:268 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:268 From: Eric E Moore Date: Mon, 15 Apr 2002 00:38:44 +0100 The Goops MOP for generic application is basically undocumented. I tried to figure it out looking at goops.scm, but am a little lost. Specifically, I can't quite figure out how apply-method is supposed to work. Mostly, how (next-method) gets bound. next-method is bound in libguile/goops.c, from which these two comments may be helpful: * This implementation provides * - generic functions (with class specializers) * - multi-methods * - next-method * - a hard-coded MOP for standard gf, which can be overloaded for non-std gf and * Protocol for calling a generic fumction * This protocol is roughly equivalent to (parameter are a little bit different * for efficiency reasons): * * + apply-generic (gf args) * + compute-applicable-methods (gf args ...) * + sort-applicable-methods (methods args) * + apply-methods (gf methods args) * * apply-methods calls make-next-method to build the "continuation" of a a * method. Applying a next-method will call apply-next-method which in * turn will call apply again to call effectively the following method. also note that "scm_slots_exists_p" has been changed recently in cvs to "scm_slot_exists_p". thi _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user