unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@giblet.glug.org>
Cc: guile-user@gnu.org
Subject: Re: MOP question
Date: Tue, 23 Apr 2002 20:01:18 -0700	[thread overview]
Message-ID: <E170D1y-00078y-00@giblet> (raw)
In-Reply-To: <87it6tu9yz.fsf@dyn006239.shef.ac.uk> (message from Eric E Moore on Mon, 15 Apr 2002 00:38:44 +0100)

   From: Eric E Moore <e.e.moore@sheffield.ac.uk>
   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


  reply	other threads:[~2002-04-24  3:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-14 23:38 MOP question Eric E Moore
2002-04-24  3:01 ` Thien-Thi Nguyen [this message]
2002-04-24 18:36   ` Eric E Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E170D1y-00078y-00@giblet \
    --to=ttn@giblet.glug.org \
    --cc=guile-user@gnu.org \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).