Kawa 1.11 releasedKawa 1.11 is now evailable from the usual places:
ftp://ftp.gnu.org/pub/gnu/kawa/kawa-1.11.tar.gz (source code)
For a full list of changes, see the news page. Below are some highlights.
Improved object initialization
When constructing an object and there is no matching
constructor method, look for "
add" methods in addition
set" methods. Also, allow passing constructor args
as well as keyword setters.
These features make it more convenient to allocate and initialize
See here for details and examples, including a simple but complete Swing application.
In a context that expects a Single Abstract Method (SAM) type (for
java.lang.Runnable), if you pass a lambda you will get an
object where the lambda implements the abstract method. For example,
you can just write:
(button:addActionListener (lambda (e) (do-something)))instead of the equivalent but more long-winded:
(button:addActionListener (object (java.awt.event.ActionListener) ((actionPerformed (e ::java.awt.event.ActionEvent))::void (do-something))))See here for more information.
define-enum form, contributed by Jamison Hope,
makes it easy to define enuration types and values compatible with Java5 enums.
(define-enum colors (red blue green))For more details and examples, see here.
New Kawa logoKawa new has a logo contributed by Jakub Jankiewicz: