Major feature enhancements
We cover R7RS-large Red and Tangerine Edition.
srfi-101: Purely functional random-access pairs and lists (scheme.rlist)
srfi-116: Immutable list library (scheme.ilist)
srfi-135: Immutable texts (scheme.text)
srfi-159: Combinator formatting (scheme.show)
srfi-176: Version flag. Supported as built-in. (version-alist)
srfi-195: Multiple-value boxes (Boxes).
In Gauche, string access using integer character index costs O(n) by default, because we store strings in multibyte format. Two improvements are incorporated to allow O(1) random string access.
scheme.textlibrary provides this feature (with a distinct type
text). In Gauche, a text is simply a string with a string index computed. See String%20indexing for the details.
Note: Gauche internally had string pointers to implement some
string operations efficiently. Now string cursors can be used for
that purpose, we dropped string pointers. If you have code that
uses string pointers, although it was undocumented, you can keep using
it by defining
GAUCHE_STRING_POINTER environment variable.
We'll completely drop it in the next release, though.
Scheme defines literal pairs to be immutable, but it is up to the implementation to check it. Gauche used to not check it, allowing mutating literal pairs. Now it is no longer allowed--it throws an error. Mutating literal pairs is never correct, and if you get the error, you've been doing it wrong.
Immutable pairs can also be explicitly constructed using scheme.ilist module. In Gauche, immutable pairs and lists behaves exactly like normal pairs and lists, except that they can't be modified. See Mutable%20and%20immutable%20pairs, for the details.
If your code depends on the previous behavior and can't change
swiftly, set the environment variable
to restore the old behavior.
The editor feature is enhanced a lot, including online help. Type
M-h h to get a quick cheet sheet.
The line editor isn't turn on by default yet, but you can either
turn on with the command-line option
the environment variable
You no longer need to
(use gauche.parameter) to use parameters
as defined in R7RS. The module still exists and provides
a few obscure features.
We now supports bitvector type in the core. Note that there's
a syntax conflict with bitvector literals and incomplete strings;
now the official way of incomplete string literal is to prefix
a string with
#**. The older syntax is still recognized
as far as it's not ambiguous. See Incomplete%20strings.
This only affects for C code using ScmPort. To support future extensions flexibly, we hide the internal implementation of ScmPort. It shouldn't affect code that accesses ScmPort via API, but if the code directly refers to the members of ScmPort, it should be rewritten to use API.
One notable change is that port positions no longer need to be an integer offset.
<mbed-tls>is used if it's available.
<ax-tls>is always available but its cipher support is limited and can't connect to some https sites.
Now we support conversion natively,
between UTF (8, 16, 32) and ISO8859-n, as well as between Japanese
encodings. We use
iconv(3) only when we need to deal with other
This is because
iconv lacks a necessary API to support
srfi-181 transcoded ports properly. If you just need to convert
encodings, you can keep using
gauche.charconv and it handles wide
variety of encodings supported by
iconv. If you use
the conversion is limited between the natively supported encodings.
We may enhance native support of conversions if there's need for it.
~fhandle complex numbers as well, and added a bunch of new directives:
replacestrictness that replaces invalid unicode sequence with
U+FFFD. utf8->string is also changed to use the replace character for invalid input sequence, instead of throwing an error.
#tto both symbols and wrapped identifiers. In ER-macro systems, identifiers can be a bare symbol as well. To check an object is an identifier but not a symbol, you can use wrapped-identifier? to check an object is a non-symbol identifier.
goshis run inside a build tree (with
-frestoption), make sure we link with
libgauche.soin the build tree regardless of the setting of
LD_LIBRARY_PATH. ( https://github.com/shirok/Gauche/pull/557 )
aproposnow takes a string as well as a symbol ( https://github.com/shirok/Gauche/pull/555 )
.dir-locals.elfile in the source tree. It sets up Emacs to add some Gauche-specific indentations.
goshis run in suid/sgid process, do not load
.gauchercfile and do not load/save history files.
default-exactnessoptional argument to specify the exactness of the result when no exactness prefix is given in the input.
gauche-package generatecan now generate template of Scheme-only package.
:collectionqualifier to use a collection as a generator.
<time>object for timestamp.
eqv?, we use
eqv-hashregardless of comparator's hash function. It is permitted by srfi-125, and it allows objects that doesn't have hash method can still be used with eq/eqv based hashtables ( https://github.com/shirok/Gauche/issues/708 ).
:errorkeyword argument accepts
:merge, to tell
run-processthat stderr should be merged into stdout.
-eoption can accept multiple S-expressions.
:notpseudo class rendering ( https://github.com/shirok/Gauche/pull/645 ), added missing
an+bsyntax ( https://github.com/shirok/Gauche/pull/648 ).
:encodingkeyword argument ( https://github.com/shirok/Gauche/issues/651 ).
applydetects if the argument list is circular and throws an error.
copy-listdetects the circular list and throws an error.
and-let*is allowed to take an empty body.
undefinedhygienically, causing an error when used in R7RS code that doesn't inherit