[plt-scheme] OT: kawa

From: Felix Klock's PLT scheme proxy (pltscheme at pnkfx.org)
Date: Wed Feb 11 09:45:08 EST 2004


Before I dove head-first into PLT Scheme, I spent a short while using 
scheme48 for my development, but for a number of years before that, I 
was using Kawa pretty much exclusively (I was slowly migrating from 
being a full Java-phile back to loving Scheme again).

I was pretty happy with its performance.  When you're targeting JVMs, 
here really isn't any substitute for compiling down to raw Java 
byte-code; as far as I know, Kawa was the only Scheme-in-Java 
implementation that can compile code and then load it at runtime using 
ClassLoaders and what not.  (But if you don't need to do that at 
runtime, you may want to look into options like Bigloo).

There was sometimes weirdness with attempting to build Swing-based GUIs 
using Kawa; you really couldn't easily make new implementations of 
interfaces to pass in as Listener objects.  I usually got around this 
by writing (in Java) simple dispatching classes that implemented the 
appropriate interfaces that took a set of closures in their 
constructors.  Inconvenient, but once you got the dispatch classes 
working, things were okay.  Per Bothner said at various point that he 
was going to fix the mechanism for creating new classes in Scheme code 
(which would fix this problem) but he never got around to it while I 
was using the language.

The other problem was that (at the time) there were a lot of odd 
"features" in the language that it was not trivial to disable.  
Example: this code is broken:
    (let ((foo: "hello"))
       (string-length foo:))

Why?  because the colon has been overridden to act essentially as a 
postfix quotation on symbols, to accomplish support for a nice keyword 
syntax when doing parameter passing.  There might be a way to turn this 
off, but when I started out, there wasn't, and I had to hack it code to 
disable that behavior myself.

The other thing I remember having to do was write my own ClassLoader at 
some point.  I don't remember why I did that; I think it might have had 
something to do with my unwillingness to force the user to set their 
$CLASSPATH in some funny way to get my code to work.

Oh, one more thing: you are going to have to give up SYNTAX-CASE (well, 
that and full-featured continuations.  At this point, I think I'd miss 
the former more than the latter).


On Feb 11, 2004, at 6:59 AM, Rohan Nicholls wrote:

>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Sorry this is off topic, but have been asked to develop software that 
> runs in the jre, and was wondering if anyone has used kawa and what 
> their experiences were.  Would be nice to be able to use scheme to 
> produce java byte code.:-D
> Thanks,
> rohan

"All learning is unmotivated at first."
  -G.C. Rota (10/17/97)

Posted on the users mailing list.