Android and Kawa

Anyone who enjoys functional programming is going to have a rough time on Android. You’re basically locked into Java because most of the functionality of the OS, the UI for example, isn’t exposed to C code. So it’s time to find a Scheme implementation that works on top of davlik. Turns out Kawa works pretty well and it’s blazing fast. Unfortunately there really isn’t enough information out there about how to use it, Kawa’s documentation leaves much to be desired and its error messages can be beyond cryptic.

I translated some examples from Java into Scheme and set up some scripts to help with setting up new projects, you can everything on github. At the bottom of the readme file I documented some of the more exciting error messages. Even though I tried to stay at close to the original Java as possible, even when it felt pretty disgusting, I couldn’t help myself in some cases. Take starting a new thread. In Java that takes several lines and a new class, and due to the lack of macros can’t really be shortened much. In scheme with a trivial macro this becomes simply (thread code ...). It doesn’t get more beautiful than that. I’ll be putting up a full Android application sometime in the near future.

One Response to “Android and Kawa”

  1. more details says:

    Betta fish are beautiful when kept healthy and
    happy, and also this article will provide you with the basics on how to achieve exactly that.

    Good betta fish care dictates giving your pet a container that is certainly large enough for that
    fish to swim around at the very least a little bit.

Leave a Reply