public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* 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).