From: Andy Wingo <wingo@pobox.com>
Cc: Guile Users <guile-user@gnu.org>
Subject: Re: Do we have to worry about the names of generic functions?
Date: Fri, 14 May 2004 20:40:38 +0100 [thread overview]
Message-ID: <1084563638.32494.72.camel@localhost> (raw)
In-Reply-To: <m3y8nx1v2m.fsf@multivac.cwru.edu>
On Wed, 2004-05-12 at 12:14 -0400, Paul Jarc wrote:
> Andy Wingo <wingo@pobox.com> wrote:
> > Consider a generic, `output'. I assert that x.output() in Python does
> > not clobber the namespace.
>
> Agreed, because that name exists only within "x.".
I'm not sure this is true. Of course python people will agree with you,
but contrast it to the message-passing style of programming, where a
message only has meaning in as much as the recipient knows how to deal
with it. Likewise, output() only means something if `x' has an output
field, and generics only have meaning in as much as a method has been
specialized for a type.
If the generic has not been specialized for a certain type, it won't
apply. The corresponding situation would be if x (or a superclass)
doesn't define an output() method. I'm not clear on the difference,
except wrt collisions with non-generics, which I believe Andreas
covered.
There is still something inside me saying that modules should not be
exporting identifiers like 'field or 'parent. But logic's leading me the
other way!
Cheers,
--
Andy Wingo <wingo@pobox.com>
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2004-05-14 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-12 10:34 Do we have to worry about the names of generic functions? Andy Wingo
2004-05-12 16:14 ` Paul Jarc
2004-05-12 20:34 ` Andreas Rottmann
2004-05-13 17:53 ` Rob Browning
2004-05-13 18:08 ` Andreas Rottmann
2004-05-13 19:49 ` Rob Browning
2004-05-14 19:40 ` Andy Wingo [this message]
2004-05-15 19:53 ` Paul Jarc
2004-05-13 18:38 ` Rob Browning
2004-05-14 19: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=1084563638.32494.72.camel@localhost \
--to=wingo@pobox.com \
--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).