From: Per Bothner <per@bothner.com>
To: Kawa mailing list <kawa@sourceware.org>
Subject: please try 'invoke' branch - it has incompatible changes
Date: Wed, 18 Jan 2017 02:43:00 -0000 [thread overview]
Message-ID: <1d0a9c63-c6d8-a724-1162-9403fc52867b@bothner.com> (raw)
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/
reply other threads:[~2017-01-18 2:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d0a9c63-c6d8-a724-1162-9403fc52867b@bothner.com \
--to=per@bothner.com \
--cc=kawa@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).