From: Mark H Weaver <mhw@netris.org>
To: Brent Pinkney <brp@4dst.com>
Cc: guile-devel@gnu.org
Subject: Re: Help required with exporting and using GOOP generics
Date: Fri, 15 Mar 2013 17:05:06 -0400 [thread overview]
Message-ID: <87obekz859.fsf@tines.lan> (raw)
In-Reply-To: <51438B38.6040200@4dst.com> (Brent Pinkney's message of "Fri, 15 Mar 2013 22:57:28 +0200")
Mark H Weaver <mhw@netris.org> wrote:
> The proper solution is as follows:
>
> * Every generic function must be defined (using 'define-generic') and
> exported from one (and only one) module.
>
> * Every module that uses a generic function, or adds a method to it (and
> that includes slot accessors), must first import the generic function
> from the (one) module that exports it.
>
> Think of a generic function as a normal procedure that contains an
> internal table of methods. Like any other procedure, there's a single
> module that defines it and exports it. The fact that some modules add
> methods to these internal tables does not mean that it is appropriate to
> export the procedure from those other modules.
Brent Pinkney <brp@4dst.com> wrote:
> How does that work in an environment where you are using third party
> libraries, lice srfi, ice-9, guile-lib, etc as well as your own code.
I'm sorry, I don't understand what you mean here.
> How could one possibly ensure that the other libraries export say
> "format" correctly - perhaps they are purists and not even aware of
> the goops modules.
'format' is not a generic function. What does that have to do with this
discussion?
> I think guile has it backwards here - goops must not break quiles
> modules when someone imports a guile generic.
Again, I don't understand. What do you mean by "break guile's modules"?
Can you please elaborate?
Thanks,
Mark
next prev parent reply other threads:[~2013-03-15 21:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 10:55 Help required with exporting and using GOOP generics Brent Pinkney
2013-03-14 18:27 ` David Pirotte
2013-03-14 21:42 ` Mark H Weaver
2013-03-15 0:11 ` dsmich
2013-03-15 20:57 ` Brent Pinkney
2013-03-15 21:05 ` Mark H Weaver [this message]
2013-03-15 21:45 ` 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=87obekz859.fsf@tines.lan \
--to=mhw@netris.org \
--cc=brp@4dst.com \
--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).