This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Trouble understanding define (!)
Marius Vollmer <mvo@zagadka.ping.de> writes:
> me> generic functions are *not* ordinary objects,
>
> They should be, from the point of view of the module systems.
[ snip ]
well, I guess we should define what we are talking about. me, I'm
talking about generic functions that I would want to actually use. I
do agree that named generics are not very Schemely, but I find the
namedness important. and I can't see what's wrong with deviating from
"core" Scheme principles where the deviation is convenient, not
conflicting with anything else and well defined (the "well defined"
thing is very important here).
> In what way are they namespaces?
>
> They are about dispatching to different functions depending on the type
> of the arguments. These types don't have names.
I wasn't very rigorous in my definitions, you see. names as such
don't have to be symbols. you can view a generic function as a kind
of "applicative namespace" where the names are lists of class objects
(or indeed any objects that can serve as specifiers). that ok? ;)
> me> if
> me> 0. GF0 and GF1 are generic functions.
> me> 1. (eq? (generic-name GF0) (generic-name GF1))
> me> 2. (eq? (class-of GF0) (class-of GF1))
> me> then
> me> (eq? GF0 GF1)
>
> [ I don't think you can define `eq?' in this way, generally. You can
> define `eqv?' and `equal?`, but not `eq?'. ]
yes, sorry. it should be `eqv?'.
> In Scheme, objects do not have names.
>
> Either we stick to this, or do no longer pretend to be implementing a
> Scheme. Which would be OK, too. I find the thought of just leaving
> Scheme behind and following a more fleshed out standard like ANSI
> Common Lisp quite appealing.
well, I'm interested in Guile just as in an attempt to design and
implement an extended Scheme with a CLOS-like object system. GOOPS is
the thing that got me not to lose all interest in Guile a year or so
ago. I'm not so interested in another Common Lisp - Clisp is there,
after all.
> Guile is not a research project in
> language design, but it more and more turns out to be one.
but of course. there are enough "just Schemes" out there already.
> - Marius
--mike
--
A CONS is an object which cares.
-- Bernie Greenberg.