This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: Kawa Servlets
Chris <chris@bitmead.com> writes:
> Wouldn't it be reasonable if a Java class was mapped to a CLOS style
> interface? The thing is there are millions of useful classes out there
> and it's a bit boring to turn them into good scheme interfaces.
> Something that mapped them to a CLOS type object that was "close
> enough", would be preferable to manually creating one.
Well, that is a bit tricky, because the CLOS object model is very
different from Java's. Specifically, CLOS does not have object methods,
it only has methods that are part of generic functions. CLOS classes
have slots, but no methods. It is plausible to map "properties" (i.e.
either public fields or getXXX/setXXX pairs as in JavaBeans) to "slots".
But automatically mapping methods to generic functions is more difficult.
While I do have plans to implement CLOS-style classes in Kawa
(see http://www.bothner.com/~per/papers/jaoo99.html), that involves
translating CLOS-like Scheme code to Java classes. Going the other
way may not make sense. In that case it may make more sense use
classes-with-methods - which I also intend to support. In fact you
can already do that quite conventiently, using the `make', `invoke',
and `invoke-static' functions, so I'm not quite sure what people are
asking for.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/