Pre-Scheme is a statically typed dialect of the Scheme programming language, combining the flexibility of Scheme with the efficiency and low-level machine access of C. The compiler uses type inference, partial evaluation, and other correctness-preserving transformations to compile a subset of Scheme into C with no additional runtime overhead. This makes Pre-Scheme a viable alternative to C for programming virtual machines, operating systems, and embedded systems where the runtime overhead of a complete Scheme implementation is not desirable.

Status

Thanks to an NGI Zero grant facilitated by the NLnet Foundation, the Pre-Scheme Restoration project is now underway! A high-level overview of the project is available in the announcement post, and the latest progress is detailed in the first progress report.

History

Pre-Scheme was originally developed by Richard Kelsey and Jonathan Rees in 1986 as the implementation language for the Scheme 48 virtual machine. In the following years, Richard developed the compiler for Pre-Scheme based on his dissertation work on the "Transformational Compiler". The compiler remains part of the Scheme 48 project and is used to compile its virtual machine and garbage collector(s) to native code.

Features

Compared to C, Pre-Scheme offers the following features:

Compared to Scheme, Pre-Scheme has the following restrictions: