[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] New features in WG1 Scheme redux
Here's a non-authoritative summary of the currently approved new features
in R7RS small Scheme. It replaces the one I posted on October 17.
Identifiers and symbols will be case-sensitive by default, the same as
R6RS and many R5RS implementations.
Inexact values +inf.0, -inf.0, and +nan.0.
Escaped symbols with |...|.
Named character escapes (short and long names) in strings.
Numeric character escapes in strings and symbols.
#; S-expression comments and #|...|# block comments.
Read and write of cyclic data using Common Lisp syntax: #n# specifies a
reference point, and #n= refers to it, for integer n.
LETREC* is added, and internal DEFINE is made to use it.
Tail patterns, dotted tail patterns, ellipsis escaping, ellipsis
redefinition, and _ as wildcard in syntax-rules.
Implicit BEGINs will be changed to implicit (LET () ...) blocks in at least
MAP and FOR-EACH are allowed to take lists of unequal length, and stop
when the shortest list runs out.
ASSOC and MEMBER take an optional third argument, the predicate to use
instead of EQUAL?.
New procedures (some will be in WG1 modules):
call/cc (same as call-with-current-continuation)
current-error-port (R6RS, analogous to current-output-port)
error (SRFI 23: arguments are error string and irritants)
exact-integer-sqrt (R6RS: returns two values, square root and remainder)
finite? (R6RS: not an infinity or NaN)
get-output-string (SRFI 6)
list-set! (like vector-set! and string-set!)
make-list (like make-vector and make-string)
nan? (R6RS: equal to +nan.0)
open-input-string (SRFI 6)
open-output-string (SRFI 6)
string-for-each (like for-each)
string-map (like map)
string-ni<=? (compare normalized versions of arguments)
syntax-error (report an error at macro expansion time)
vector-for-each (like for-each)
vector-map (like map)
WG1 Scheme will have a module system equivalent to R6RS without versioning
or phasing, and with the forms INCLUDE to bring in a file and BODY
to embed the body.
For those not familiar with R6RS modules, this means that each module
will be defined in a little language, not Scheme. The little language
permits the module author to specify the name of the module (a list of
identifiers and/or exact integers), the modules imported by this module,
the identifiers exported by this module, and the files and/or Scheme code
to be included in the module. When importing a module, it is possible to
(a) include certain identifiers, (b) exclude certain identifiers, (c)
rename certain identifiers, or (d) attach a prefix to all identifiers.
Identifiers can also be renamed on export.
Importing will also be possible in the REPL, where a later import of
the same module will override an earlier one.
The little language does not have macros, so the forms in it must appear
TRANSCRIPT-ON and TRANSCRIPT-OFF have been removed from R7RS.
R7RS Schemes are no longer required to support exponent indicators other
than "e" in inexact numeric constants.
[W]hen I wrote it I was more than a little John Cowan
febrile with foodpoisoning from an antique carrot cowan@x
that I foolishly ate out of an illjudged faith http://ccil.org/~cowan
in the benignancy of vegetables. --And Rosta
Scheme-reports mailing list