unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Dirk Herrmann <dirk@sallust.ida.ing.tu-bs.de>
Cc: guile-devel@gnu.org, guile-user@gnu.org
Subject: Re: goops question
Date: Mon, 8 Jul 2002 21:59:11 +0200 (CEST)	[thread overview]
Message-ID: <agcr6g$4bl$2@main.gmane.org> (raw)
In-Reply-To: <87fzyu9iu0.fsf@zagadka.ping.de>

On 8 Jul 2002, Marius Vollmer wrote:

> Dirk Herrmann <dirk@sallust.ida.ing.tu-bs.de> writes:
> 
> > "define-class, define-generic and define-accessor can only be used at the
> > top level"
> 
> I'm not calling myself an expert here, but I would say that it is very
> valid to use 'define-class' inside some lexical scope.  Just think of
> utility structs that are only used in one function.

Surprisingly, define-class is the only one of the three where in the code
it is explicitly checked that it is only executed on the top level.  For
this reason, the definition of define-class could really easily converted
to use an mmacro instead of a macro.

For define-generic and define-accessor things are different:  In the code
there is no explicit check for asserting execution on the top level.
However, I was not able to make define-generic work in a lexical scope:  I
always get 'bad define placement' as a result - although I don't
understand it.

However, if it was granted that define-class, define-generic and
define-accessor are all three just used on the top level, they can simply
be converted to use an mmacro instead of a macro:  just exchange the call
to procedure->macro by a call to procedure->memoizing macro, and you are
done.

Thus, I would like people to confirm that it is actually not possible to
use define-class, define-generic and define-accessor other than at the top
level.  If someone can give us an counterexample, things will be more
difficult.

Best regards
Dirk Herrmann


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  parent reply	other threads:[~2002-07-08 19:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.4.05.10207071043010.9685-100000@sallust.ida.ing.tu-bs.de>
2002-07-08 18:26 ` goops question Marius Vollmer
     [not found] ` <87fzyu9iu0.fsf@zagadka.ping.de>
2002-07-08 19:59   ` Dirk Herrmann [this message]
2002-07-09 21:17   ` Neil Jerram
2021-04-29 23:10 GOOPS question Damien Mattei
2021-04-30  5:52 ` Atom X
2021-04-30  7:55 ` Mikael Djurfeldt
2021-05-02  0:07   ` Damien Mattei
2021-05-02 10:14     ` Damien Mattei
2021-05-02 10:26       ` Mikael Djurfeldt
2021-05-02 10:58         ` Damien Mattei
2021-05-02 10:34       ` Damien Mattei
2021-05-02 10:35       ` tomas
2021-05-02 10:21     ` Mikael Djurfeldt
2021-05-08 21:11       ` Damien Mattei
2021-05-10 12:22         ` Mikael Djurfeldt
2021-04-30  7:57 ` Linus Björnstam
2021-04-30  9:47   ` Damien Mattei
2021-04-30 10:43     ` Mikael Djurfeldt
2021-04-30 11:08 ` Mikael Djurfeldt
2021-04-30 12:19   ` Stefan Israelsson Tampe
2021-04-30 14:50     ` Mikael Djurfeldt
2021-04-30 15:15       ` Mikael Djurfeldt
  -- strict thread matches above, loose matches on Subject: below --
2002-07-07  8:45 goops question Dirk Herrmann

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='agcr6g$4bl$2@main.gmane.org' \
    --to=dirk@sallust.ida.ing.tu-bs.de \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@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).