* please try 'invoke' branch - it has incompatible changes
@ 2017-01-18 2:43 Per Bothner
0 siblings, 0 replies; only message in thread
From: Per Bothner @ 2017-01-18 2:43 UTC (permalink / raw)
To: Kawa mailing list
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
string.
* _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:
(define args (Object[] 3 "cm"))
(java.lang.String:format "length:%s%s" args)
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))
--
--Per Bothner
per@bothner.com http://per.bothner.com/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-18 2:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 2:43 please try 'invoke' branch - it has incompatible changes Per Bothner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).