Previous: , Up: Features   [Contents][Index]

Compatibility with standards

Kawa implements all the required and optional features of R7RS, with the following exceptions.

The entire “numeric tower" is implemented. However, some transcendental functions only work on reals. Integral functions do not necessarily work on inexact (floating-point) integers. (The whole idea of “inexact integer" in R5RS seems rather pointless ...)

Also, call-with-current-continuation is only “upwards" (?). I.e. once a continuation has been exited, it cannot be invoked. These restricted continuations can be used to implement catch/throw (such as the examples in R4RS), but not co-routines or backtracking.

Kawa now does general tail-call elimination, but only if you use the flag --full-tailcalls. (Currently, the eval function itself is not fully tail-recursive, in violation of R5RS.) The --full-tailcalls flag is not on by default, partly because it is noticably slower (though I have not measured how much), and partly I think it is more useful for Kawa to be compatible with standard Java calling conventions and tools. Code compiled with --full-tailcalls can call code compiled without it and vice versa.

Even without --full-tailcalls, if the compiler can prove that the procedure being called is the current function, then the tail call will be replaced by a jump. This includes must “obvious” cases of calls to the current function named using define or letrec, and many cases of mutual tail-recursion (including state-machines using letrec).

By default, symbols are case sensitive.

Kawa implements most of the features of the expression language of DSSSL, the Scheme-derived ISO-standard Document Style Semantics and Specification Language for SGML. Of the core expression language, the only features missing are character properties, external-procedure, the time-relationed procedures, and character name escapes in string literals. From the full expression language, Kawa additionally is missing format-number, format-number-list, and language objects. Quantities, keyword values, and the expanded lambda form (with optional and keyword parameters) are supported.


Previous: , Up: Features   [Contents][Index]