From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eric E Moore Newsgroups: gmane.lisp.guile.user Subject: MOP question Date: Mon, 15 Apr 2002 00:38:44 +0100 Sender: guile-user-admin@gnu.org Message-ID: <87it6tu9yz.fsf@dyn006239.shef.ac.uk> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: main.gmane.org 1018827717 26028 127.0.0.1 (14 Apr 2002 23:41:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 14 Apr 2002 23:41:57 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16wtd6-0006lg-00 for ; Mon, 15 Apr 2002 01:41:57 +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 16wtaK-0001Km-00; Sun, 14 Apr 2002 19:39:04 -0400 Original-Received: from dyn006239.shef.ac.uk ([143.167.6.239]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16wta3-0001KM-00 for ; Sun, 14 Apr 2002 19:38:47 -0400 Original-Received: by dyn006239.shef.ac.uk (Postfix, from userid 1000) id 38B4F4887; Mon, 15 Apr 2002 00:38:46 +0100 (BST) Original-To: guile-user@gnu.org Original-Lines: 46 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2 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:173 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:173 --=-=-= Content-Transfer-Encoding: quoted-printable 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.=20=20 It looks to me like it's supposed to be passed as an argument to the body of the method, but nothing I can see does that. On top of that, calling apply-method directly doesn't work (complaining about as I would expect, the wrong number of args to the method body): (use-modules (oop goops)) (define-class () (slot1)) (define-class () (slot2)) (define-method (baz (foo )) foo) (define-method (baz (foo )) foo) (define l (compute-applicable-methods baz (list (make )))) (define m1 (car l)) (define m2 (cadr l)) ; ; stolen from apply-methods ; (define next (lambda (procs args) (lambda new-args (let ((a (if (null? new-args) args new-args))) (if (null? procs) (no-next-method gf a) (apply-method gf procs next a)))))) (apply-method baz l next (list (make )))=20=20=20=20=20 =2D-=20 Eric E. Moore --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8uhMG40OczkogoRERAjfmAKCjLG2JEBHbHc/QC+J86G3/dDbQUQCfZeEZ 2e7jLyQcCJIpsT8l6byMsmg= =93PI -----END PGP MESSAGE----- --=-=-=-- _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user