From: Mark H Weaver <mhw@netris.org>
To: BT Templeton <bpt@hcoop.net>
Cc: guile-devel@gnu.org
Subject: Re: Applicable GOOPS objects?
Date: Sat, 24 Mar 2012 02:23:49 -0400 [thread overview]
Message-ID: <87bonmo6tm.fsf@netris.org> (raw)
In-Reply-To: <87obrmlhwo.fsf@olor.terpri.org> (BT Templeton's message of "Sat, 24 Mar 2012 00:52:39 -0400")
BT Templeton <bpt@hcoop.net> writes:
> Mark H Weaver <mhw@netris.org> writes:
>
>> Hello all,
>>
>> I was chatting with the folks working on Python-on-Guile, and it seems
>> clear that they need the ability to create GOOPS objects that can
>> emulate procedures. Otherwise they will probably end up creating an
>> entirely separate object system for Python, which would obviously be
>> suboptimal.
[...]
>
> GOOPS defines an <applicable-struct-class> metaclass for this (similar
> to AMOP's funcallable-standard-class):
>
> scheme@(guile-user)> (define-class <foo> (<applicable-struct>))
> scheme@(guile-user)> ((make <foo> #:procedure car) '(1 2))
> $1 = 1
>
> Would it work to simply have all Python metaclasses inherit from
> <applicable-struct-class>?
Yes, I believe it will. Thanks very much! :)
Mark
PS: I notice that there's also 'scm_class_applicable_struct_with_setter'
which is exported as SCM_API, but was apparently never implemented
and is always NULL.
next prev parent reply other threads:[~2012-03-24 6:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 19:02 Applicable GOOPS objects? Mark H Weaver
2012-03-24 3:36 ` Nala Ginrut
2012-03-24 4:52 ` BT Templeton
2012-03-24 6:23 ` Mark H Weaver [this message]
2012-03-24 18:07 ` Mark H Weaver
2012-03-24 23:48 ` BT Templeton
2012-03-25 13:50 ` Mark H Weaver
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=87bonmo6tm.fsf@netris.org \
--to=mhw@netris.org \
--cc=bpt@hcoop.net \
--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).