This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: define-procedure with several lambda forms?
- From: Per Bothner <per at bothner dot com>
- To: "Hoehle, Joerg-Cyril" <Joerg-Cyril dot Hoehle at t-systems dot com>
- Cc: kawa at sources dot redhat dot com
- Date: Fri, 31 Oct 2003 11:37:58 -0800
- Subject: Re: define-procedure with several lambda forms?
- References: <9F8582E37B2EE5498E76392AEDDCD3FE0792FC44@G8PQD.blf01.telekom.de>
Hoehle, Joerg-Cyril wrote:
I'm having trouble with define-procedure when trying to define more than a method.
The manual is a little misleading here. It just says:
(However, the current implementation of selecting the "best" method
is not reliable if there is more than one @var{method} )
I replaced it by the following to (the CVS version of) the manual:
Note: The current implementation of selecting the "best" method
is not reliable if there is more than one method.
It can select depending on argument count, and it can select between
primitive Java methods. However, it cannot yet do what you probably
hope for: select between different Scheme procedures based on
parameter types.
The problem is currently there is no solid way that Kawa "remembers" the
parameter types of a lambda method. If you pass PrimProcedure objects
to define-procedure (or make-procedure) it works better, because Kawa
can at least look at the method argument types.
The general problem is having the compiler generate code to represent
the parameter type list, and check it (efficiently). I haven't had time
to do this. It is desirable not only for resolving generic methods, but
also for better error messages and improving static type checking.
--
--Per Bothner
per@bothner.com http://per.bothner.com/