The Procedural Fascicle
Editor’s introduction to this fascicle
Note: This introduction will not appear in the final report.
The Procedural Fascicle defines basic syntax and procedures that are used to do procedural programming in Scheme. It defines
- the syntax of creating procedures (
lambda), - the definition form for REPLs and for libraries
(
define), - forms for block-structured variable binding (
let), - destructive assignment (
set!), - conditionals and loops (
if,and,do), - and definitions of the equivalence of objects
(
eqv?).
Compared to the R7RS small report, this fascicle adds:
definewith no right hand side, like in the R6RS.- Higher order procedure definitions as in SRFI 219.
define-aliasto make one identifier refer to another.letrec-valuesandletrec*-values.- A
recform similar to the one that appeared in the RRRS to define anonymous recursive procedures. - The ability to mix definitions and expressions in bodies.
- A
condthat handles multiple values as in SRFI 61. - The clauses for
cond,case, and the internals ofwhenandunless, are now bodies and allow for definitions. - It is now syntactically valid for
condandcaseto have no clauses.
Most of these changes can be implemented with either the
syntax-rules or syntax-case hygienic macro
system.
The Working Group decided to keep the R7RS's behavior of allowing
procedures to be tested for equality using eqv?. The
Working Group noted that such behavior, which was deliberately omitted
in the R6RS, may inhibit some compiler optimizations and may make the
semantics of the language more complicated. The Working Group is
particularly interested in hearing from implementers about these
issues.