unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: GOOPS todo
Date: Thu, 24 Apr 2008 00:03:26 +0200	[thread overview]
Message-ID: <87fxtcfcup.fsf@gnu.org> (raw)
In-Reply-To: m3ej91bwwa.fsf@pobox.com

Hi Andy!

Andy Wingo <wingo@pobox.com> writes:

> * Generic application only works for instances of <generic>, or for
>   instances of a couple of other specially blessed classes. This is
>   because for these classes, the C code knows how the objects will be
>   laid out in memory, and can access memory directly instead of using
>   slot-ref. In general in GOOPS (and in MOPs in general) there is a
>   tension between extensibility and efficiency; the former is expressed
>   in protocols of generic functions, and the latter in invariants and
>   possibilities for direct memory access.
>
>   The evaluator really needs to be able to do direct memory access, if
>   possible. So for that reason the existing bits of generic function
>   dispatch that are wired into eval.c check instances of those blessed
>   clases, via checks like (SCM_OBJ_CLASS_FLAGS (proc) &
>   SCM_CLASSF_PURE_GENERIC).
>
>   This "direct memory access" also has repercussions in tail recursion;
>   that if the code to dispatch a method can't bottom out in eval.c, we
>   lose tail recursion.
>
>   So, we need to add support for instances of subclasses of <generic>,
>   without losing efficiency. Apparently there is some code for this, see
>   goops.scm:apply-generic.

(I realize this answers my previous message on `guile-user'...)

Good to see you have idea on this!  :-)

> * We have no :before or :after methods. I don't know if STKlos had these
>   either.

Not sure, but a nice thing to have.

> * GOOPS should define a with-accessors macro.

Actually, I don't like it a lot (probably because I wouldn't mind adding
accessors to the global namespace).  Do other CLOS-like systems have
something similar?

> * GOOPS reference should be folded into Guile's reference, as it is now
>   part of Guile.

Not sure about it since it's quite a large document and it's easier to
search it when it's separate.

> * Possibly the worst section of Guile's manual:

I like this one.  :-)

> * method cache code could be rewritten in C (dispatch.scm), although I
>   have never had a problem with it -- it doesn't show up on my profiles.

I'd be reluctant to this, as it's already complex enough.

Thanks for this instructing (and entertaining) review!

Ludo'.





  reply	other threads:[~2008-04-23 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-19 17:02 GOOPS todo Andy Wingo
2008-04-23 22:03 ` Ludovic Courtès [this message]
2008-04-24 15:53   ` Andy Wingo

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=87fxtcfcup.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.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).