Chapter 1Introduction

Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary. Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions on how they are composed, suffice to form a practical and efficient programming language that is flexible enough to support most of the major programming paradigms in use today.

Scheme was one of the first programming languages to incorporate first-class procedures as in the lambda calculus, thereby proving the usefulness of static scope rules and block structure in a dynamically typed language. Scheme was the first major dialect of Lisp to distinguish procedures from lambda expressions and symbols, to use a single lexical environment for all variables, and to evaluate the operator position of a procedure call in the same way as an operand position. By relying entirely on procedure calls to express iteration, Scheme emphasized the fact that tail-recursive procedure calls are essentially GOTOs that pass arguments, thus allowing a programming style that is both coherent and efficient. Scheme was the first widely used programming language to embrace first-class escape procedures, from which all previously known sequential control structures can be synthesized. A subsequent version of Scheme introduced the concept of exact and inexact numbers, an extension of Common Lisp’s generic arithmetic. Scheme later became the first programming language to support hygienic macros, which permit the syntax of a block-structured language to be extended in a consistent and reliable manner.

1Historical background

The first description of Scheme was written in 1975 SussmanAndSteele75. A revised report appeared in 1978 SteeleAndSussman78, which described the evolution of the language as its MIT implementation was upgraded to support an innovative compiler SteeleAndSussman78.Three distinct projects began in 1981 and 1982 to use variants of Scheme for courses at MIT, Yale, and Indiana University ReesAndAdams82FessendenEtAl83SchemeManual84. An introductory computer science textbook using Scheme was published in 1985 AbelsonAndSussman85.

As Scheme became more widespread, local dialects began to diverge until students and researchers occasionally found it difficult to understand code written at other sites. Fifteen representatives of the major implementations of Scheme therefore met in October 1984 to work toward a better and more widely accepted standard for Scheme. Their report, the RRRSClinger85, was published at MIT and Indiana University in the summer of 1985. Further revision took place in the spring of 1986, resulting in theR3RS. Work beginning in the spring of 1988 resulted in R4RS, which became the basis for the IEEE Standard for the Scheme Programming Language in 1991IEEEScheme. In 1998, several additions to the IEEE standard, including high-level hygienic macros, multiple return values, and `eval', were finalized as theR5RSKelseyEtAl98.

In the fall of 2006, work began on a more ambitious standard, including many new improvements and stricter requirements made in the interest of improved portability. The resulting standard, the R6RSwas completed in August 2007 SperberEtAl09, and was organized as a core language and set of mandatory standard libraries. Several new implementations of Scheme conforming to it were created. However, most existingR5RSimplementations (even excluding those which are essentially unmaintained) did not adopt R6RS, or adopted only selected parts of it.

In consequence, the Scheme Steering Committee decided in August 2009 to divide the standard into two separate but compatible languages: asmalllanguage, suitable for educators, researchers, and users of embedded languages, focused onR5RScompatibility; and a largelanguage focused on the practical needs of mainstream software development, intended to become a replacement for R6RS.The smalllanguage was completed in 2013; this report describes thelargelanguage. Apart from providing more facilities for programmers to use, it imposes more strict requirements on implementations than the small language, in order to provide a more stable base for applications and libraries which are portable between implementations. A second edition of the small language report is expected to follow, with errata corrected and with additional notes for programmers writing code intended to work on both versions of the language.

We intend this report to belong to the entire Scheme community, and so we grant permission to copy it in whole or in part without fee. In particular, we encourage implementers of Scheme to use this report as a starting point for manuals and other documentation, modifying it as necessary.