[Openmcl-devel] An error in the MOP implementation?
Gary Byers
gb at clozure.com
Mon Mar 6 13:07:39 PST 2006
In describing what's implemented in OpenMCL's partial MOP and what isn't,
the documentation (section 8.2) says:
"Note that those generic functions whose status is "-" in the table
above deal with the internals of generic function dispatch and method
invocation (the "Generic Function Invocation Protocol".) Method
functions are implemented a bit differently in OpenMCL from what the
MOP expects, and it's not yet clear if or how this subprotocol can be
well-supported."
On Mon, 6 Mar 2006, Jens Bjerrehuus wrote:
> I'm using the introspection facilities in the MOP to implement a
> test framework and I'm running into a problem with the return value
> from METHOD-FUNCTION. In OpenMCL METHOD-FUNCTION returns a
> FUNCALL'able method function, which does not accept a list of next-
> methods as a second argument. According to this thread (http://
> www.codecomments.com/message394530.html), which references the MOP
> documentation for MAKE-METHOD-LAMBDA, the returned method function
> should accept two arguments: the list of arguments to the generic
> function and the list of next-methods. This is also how it works in
> e.g. SBCL, which I'm using as a second implementation to test for
> portability.
>
> The example given in the above mentioned thread results in an
> error in OpenMCL:
>
> (defgeneric foo (x)
> (:method ((x integer)) (isqrt x))
> (:method ((x real)) (sqrt (float x))))
> (setq my-method (find-method #'foo nil (list (find-class 'real))))
> (setq my-arglist (list 43))
> (funcall (openmcl-mop:method-function my-method) my-arglist '())
>
> Too many arguments in call to #<METHOD-FUNCTION FOO (REAL)>: 2
> provided, at most 1 accepted.
> [Condition of type CCL::TOO-MANY-ARGUMENTS]
>
> I'm not subscribed to the bug mailing list, so I thought I'd post
> it here. Maybe also to get an idea, whether others agree that it is
> indeed an error in OpenMCL's MOP implementation.
>
> -Jens
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
More information about the Openmcl-devel
mailing list