please try 'invoke' branch - it has incompatible changes
The "invoke" branch in the Kawa git repository will be the basis for the
Kawa 3.0 release. It has a number of major and exciting changes.
No idea when it will be released - but at this point it is
relatively stable and usable: Though there are some bugs and incomplete
features, most existing code should work, with few or no changes.
However, there are some incompatible changes planned, so I recommend you try out
your Kawa code on the invoke branch, and see if anything breaks.
The test it, clone the Kawa git repository, and then do:
$ git checkout invoke
and then build in the usual way.
* Most places where you could declare a new identifier binding have
been generalized to accept *note patterns: Variables and Patterns.
* The internal calling convention used for “apply” (ie. calling an
unknown-at-compile-time procedure) has been completely changed.
* _Incompatible change:_ String literals are now ‘gnu.lists.IString’
rather than ‘java.lang.String’. The advantage of using
‘gnu.lists.IString’ is that ‘string-ref’ and ‘string-length’ are
(roughly) constant-time, rather than having to linearly scan the
* _Incompatible change:_ The procedures ‘string-append’, ‘substring’,
‘list->string’, and the constructor ‘string’ return an immutable
string (an ‘IString’). (The functions ‘string-copy’ is similar to
‘substring’, but returns a mutable string.) This is a
work-in-progress with the goal of implementing SRFI-140
(http://srfi.schemers.org/srfi-140/srfi-140.html): Other procedures
will be changed to return immutable strings.
If you ‘(import (scheme base))’ standard procedures such as
‘string-append’ will return mutable strings; if you ‘(import (kawa
base))’ the procedures will return immutable strings. The
command-line options ‘--r5rs’ or ‘--r6rs’ or ‘--r7rs’ override the
default so these procedures return mutable strings.
* _Incompatible change:_ Before, if a Java parameter type was
‘java.lang.String’ Kawa would accept any value, converting it using
Object’s ‘toString’ method. Now Kawa will reject an argument if it
is not a ‘java.lang.CharSequence’.
* _Incompatible change:_ Kawa traditionally followed Java in allowing
you to pass an array with the “rest” arguments to a varargs method.
For example, you could write:
This is no longer allowed. Instead, use the splice operator:
(java.lang.String:format "length:%s%s" @args)
* _Incompatible change:_ You used to be able to write a
type-specifier in a formal parameter or return type without using
‘::’, as in:
(define (incr (x int)) int (+ x 1))
This is no longer allowed, because it conflicts with the syntax for
patterns. Instead you have to write:
(define (incr (x ::int)) ::int (+ x 1))