This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: KAWA - define-generic
- From: Per Bothner <per at bothner dot com>
- To: Chris Bitmead <chris at bitmead dot com>
- Cc: kawa <kawa at sources dot redhat dot com>
- Date: Sun, 23 Jun 2002 08:13:07 -0700
- Subject: Re: KAWA - define-generic
- References: <3D131AB3.6010101@bitmead.com>
Chris Bitmead wrote:
Is there something in Kawa like define-generic?
There is 'make-procedure' (which is documented in the manual),
and 'define-procedure' (which isn't documented but should be).
Both of these require that all the methods be supplied in the
call to 'make-procedure' or 'define-procedure'.
It should be easy enough to implement define-generic and
define-method, but I haven't.
In any case, the support for generics needs a bit of work.
The *intent* is that the following shuld work:
(define-procedure Plus
(lambda ((x :: <number>) (y :: <number>)) (+ x y))
(lambda ((x :: <string>) (y :: <string>)) (string-append x y)))
- but it doesn't. I don't know when I can get it working.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/