This chapter describes most of the changes that have been made to Scheme since the “Revised5 Report” [15] was published:
Scheme source code now uses the Unicode character set. Specifically, the character set that can be used for identifiers has been greatly expanded.
Identifiers can now start with the characters ->.
Identifiers and symbol literals are now case-sensitive.
Bytevector literal syntax has been added.
The read-syntax abbreviations #’ (for syntax), #‘ (for quasisyntax), #, (for unsyntax), and #,@ (for unsyntax-splicing have been added; see section 3.3.5.)
The external representation of number objects can now include a mantissa width.
Literals for NaNs and infinities were added.
String and character literals can now use a variety of escape sequences.
Block and datum comments have been added.
The !#r6rs comment for marking report-compliant lexical syntax has been added.
Characters are now specified to correspond to Unicode scalar values.
Many of the procedures and syntactic forms of the language are now part of the (rnrs base (6)) library. Some procedures and syntactic forms have been moved to other libraries; see figure 13.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Figure 13: Identifiers moved to libraries | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The base language has the following new procedures and syntactic forms: letrec*, let-values, let*-values, real-valued?, rational-valued?, integer-valued?, exact, inexact, finite?, infinite?, nan?, div, mod, div-and-mod, div0, mod0, div0-and-mod0, exact-integer-sqrt, boolean=?, symbol=?, string-for-each, vector-map, vector-for-each, error, assertion-violation, assert, call/cc, identifier-syntax.
The following procedures have been removed: char-ready?, transcript-on, transcript-off, load.
The case-insensitive string comparisons (string-ci=?, string-ci<?, string-ci>?, string-ci<=?, string-ci>=?) operate on the case-folded versions of the strings rather than as the simple lexicographic ordering induced by the corresponding character comparison procedures.
Libraries have been added to the language.
A number of standard libraries are described in a separate report [22].
Many situations that “were an error” now have defined or constrained behavior. In particular, many are now specified in terms of the exception system.
The full numeric tower is now required.
The semantics for the transcendental functions has been specified more fully.
The semantics of expt for zero bases has been refined.
In syntax-rules forms, a _ may be used in place of the keyword.
The let-syntax and letrec-syntax no longer introduce a new environment for their bodies.
For implementations where NaNs and/or infinities are available, the semantics of many arithmetic operations has been specified on these values consistently with IEEE 754.
For implementations that support a distinct -0.0, the semantics of many arithmetic operations with regard to -0.0 has been specified consistently with IEEE 754.
Scheme’s real number objects now have an exact zero as their imaginary part.
The specification of quasiquote has been extended. Nested quasiquotations work correctly now, and unquote and unquote-splicing have been extended to several operands.
Procedures now may or may not denote locations. Consequently, eqv? is now unspecified in a few cases where it was specified before.
The mutability of the values of quasiquote structures has been specified to some degree.
The dynamic environment of the before and after thunks of dynamic-wind is now specified.
Various expressions that have only side effects are now allowed to return an arbitrary number of values.
The order and semantics for macro expansion has been more fully specified.
Internal definitions are now defined in terms of letrec*.
The old notion of program structure and Scheme’s top-level environment has been replaced by top-level programs and libraries.
The denotational semantics has been replaced by an operational semantics.