(message (Hello 'Peter)
(you :wrote :on '(Mon, 6 Aug 2007 00:52:10 -0700))
(
PG> Well, this may seem to work, for some value of "work", but it bypasses
PG> the normal protocol for setting the discriminating function of a
PG> generic function,
well, just (make-instance 'standard-generic-function) returns more-or-less
normal generic function -- i think after setting all stuff it will be quite
functional. finalize-generic-function is still called, so it will have it's
discriminating function as normal.
PG> and what you end up with is not really a generic function at all: it
PG> has no methods, and no specializers, and it returns an answer, when
PG> you'd expect a "no applicable method" error.
if somebody sets discriminating function with
set-funcallable-instance-function it's completely up to him to decide if
that's what he wants, no?
it should be possible to implement custom discriminating function this way
or whatever.
in my case i just wanted to make a funcallable object -- i didn't want it to
be a generic function..
PG> it would take quite a bit of work to fix it properly. I think patching
PG> clos.lisp as you suggest would just make things even more confusing.
i'm afraid patching clos.lisp as i suggest is inevitable -- no matter how
CLOS will change, it still wouldn't be possible to make function fbound to
some name when it has no name at all.
even if you'll completely rewrite FINALIZE-GENERIC-FUNCTION, i think you'll
still have a form like (setf (fdefinition name) gf) in it. although if
you'll get rid of FINALIZE-GENERIC-FUNCTION..
)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"choose no life")
|