21.1 Standards
On this page:
21.1.1 R5RS
21.1.2 R6RS
Version: 4.2.1

21.1 Standards

Standard dialects of Scheme include the ones defined by R5RS and R6RS.

21.1.1 R5RS

“R5RS” stands for The Revised5 Report on the Algorithmic Language Scheme, and it is currently the most widely implemented Scheme standard.

PLT Scheme tools in their default modes do not conform to R5RS, mainly because PLT Scheme tools generally expect modules, and R5RS does not define a module system. Typical single-file R5RS programs can be converted to PLT Scheme programs by prefixing them with #lang r5rs, but other Scheme systems do not recognize #lang r5rs. The plt-r5rs executable (see plt-r5rs) more directly conforms to the R5RS standard.

Aside from the module system, the syntactic forms and functions of R5RS and PLT Scheme differ. Only simple R5RS become PLT Scheme programs when prefixed with #lang scheme, and relatively few PLT Scheme programs become R5RS programs when a #lang line is removed. Also, when mixing “R5RS modules” with PLT Scheme modules, beware that R5RS pairs correspond to PLT Scheme mutable pairs (as constructed with mcons).

See R5RS: Legacy Standard Language for more information about running R5RS programs with PLT Scheme.

21.1.2 R6RS

“R6RS” stands for The Revised6 Report on the Algorithmic Language Scheme, which extends R5RS with a module system that is similar to the PLT Scheme module system.

When an R6RS library or top-level program is prefixed with #!r6rs (which is valid R6RS syntax), then it can also be used as a PLT Scheme program. This works because #! in PLT Scheme is treated as a shorthand for #lang followed by a space, so #!r6rs selects the r6rs module language. As with R5RS, however, beware that the syntactic forms and functions of R6RS differ from PLT Scheme, and R6RS pairs are mutable pairs.

See R6RS: Standard Language for more information about running R6RS programs with PLT Scheme.