Scheme Frequently Asked Questions

The material on this page is licensed under the terms of the GNU Free Documentation License. See scheme-faq-license for more information about this.

general | language | macros | misc | programming | standards


Why is Scheme called Scheme?

According to Steele and Gabriel's "The Evolution of Lisp" paper, Scheme was originally called Schemer, in the tradition of the AI languages Planner and Conniver. But the ITS operating system had a 6-character limitation of file names, so the names were shortened to PLNR, CNVR, and SCHEME. [ Eventually the truncated name Scheme stuck.

What is the difference between Scheme and Common Lisp?

Scheme is a dialect of Lisp that stresses conceptual elegance and simplicity. It is much smaller than Common Lisp; the language specification is about 50 pages, compared to Common Lisp's 1300 page draft standard. Advocates of Scheme often find it amusing that the entire Scheme standard is shorter than the index to Guy Steele's "Common Lisp: the Language, 2nd Edition". Unlike the Scheme standard, the Common Lisp standard has a large library of utility functions, a standard object-oriented programming facility (CLOS), and a sophisticated condition handling system.

What is Scheme used for?

Scheme is often used in computer science curricula and programming language research, due to its ability to represent many programming abstractions with its simple primitives. It is also an ideal test bed for compilation and interpretation techniques since it is possible to write a simple, yet fully standards-compliant Scheme interpreter in just a few days.

There are few known uses of Scheme in "real-world" systems. Partially this may be due to the fact that Scheme is often well-hidden inside a system. Probably the most successful, and yet little-known use of Scheme is in the Document Style Semantics and Specification Language (DSSSL), which is an ISO standard for processing SGML documents. See for details. Other examples of successful Scheme applications are


The "Animation Language" provides an environment for procedural computer animation which provides a powerful modeling language, a language interpreter, and a set of interactive animation tools. See


The "Beautiful Report Language"; a framework for building server-side web applications. See

Common Music

A music composition environment which produces sound by transforming a high-level representation of musical structure into a variety of control protocols for sound synthesis and display. See


A general multi-lingual speech synthesis system with a Scheme-based command interpreter. See


An Automated Theorem Proving System written in Scheme. See


The GNU image manipulation program. See


A time tracker application that uses Scheme for generating reports. See


A tool for managing personal finances. See


The GNU project's extension language framework. See


An OSX programming environment for composers, sound artists, VJ's and graphic artists with an interest in live or interactive programming. See


An interactive symbolic mathematics program. See


A Scheme for implementing distributed systems. See kali-scheme-revival.


Engraves sheet music. LilyPond is partially written in Scheme, and also uses Scheme as an extension language. See


A system for distributing weather information, written in Scheme. See


Avant!'s, recently acquired by Synopsys, flagship VDSM database product features Scheme as the extension and tool command language. See

Naughty Dog

The game developer Naughty Dog Inc have used Scheme in the development of a several of their games. See


An extensible window manager using Scheme as the scripting/extension language. See


A text processor for writing technical documents and producing output in a variety of formats. See


The Scheme shell; a Unix shell that uses Scheme as the scripting language. See


The Scheme Constraint Window Manager; an X11 window manager with a Scheme-based dynamic configuration language. See

Siag Office

A free Office package for Unix that features Scheme as one of its extension languages. See


A sound editor that features Scheme as one of its extension languages. See


A free scientific text editor, which was both inspired by TeX and GNU Emacs. It uses Scheme as an extension language. See

Ximian Evolution

An award-winning personal and workgroup information management solution for Linux and UNIX-based systems that uses Scheme as the language for defining mail filtering rules. See

Is Scheme slow/big?

The first question you have to ask yourself is "Does it really matter?". Development time and maintenance effort are often much more important than execution speed and memory resources - "Machine cycles are cheap, people cycles are not."[Tucker Withington]. Nevertheless, there are obviously still applications where performance matters, e.g. embedded systems. There are Scheme compilers which perform quite a lot of optimisation and either compile to C or directly to machine code. The performance of such code can be pretty close to C for some applications.

The compactness of the core Scheme language make it possible to write interpreters with a very small memory footprint - there are even implementations that run on a PalmPilot (see here). Some Scheme interpreters perform a significant amount of optimisation. There is some evidence to suggest that interpreted program execution, in combination with just-in-time compilation, can be faster than executing pre-compiled code because the interpreter / JIT-compiler can perform optimisations using information that is only available at run time. As of December 12, 2007, mzscheme says: "At run time on x86, x86_64, and PowerPC platforms, MzScheme converts byte code to native code through a just-in-time compiler", so there is at least one implementation that performs JIT.

The design of Scheme makes it quite hard to perform certain common types of optimisations. For instance, one cannot normally inline calls to primitives (such as + and car) because Scheme allows the re-binding of their names to different functions. Many optimising Scheme interpreters/compilers therefore include modes that impose some restrictions on the programmer in exchange for improved execution speed.

What is the best way to learn Scheme?

Scheme is an easy language to learn once you get over your fear of parentheses. The syntax of the language contains just a handful of constructs. Anyone familiar with other programming languages will be able to write "interesting" Scheme programs after just a couple of days. Scheme does contain some advanced concepts, such as continuations and hygienic macros, that are tricky to come to grips with for both novice programmers and professionals alike. Mastering these takes time but is well worth the effort - it will make you a better programmer not just in Scheme but any language.

You need to get hold of one of the many introductory text books. A pretty comprehensive list can be found at Some of these books are also available online.

It is also essential that you install a Scheme implementation, so you can try out examples and generally explore the language by writing code in it. A fairly comprehensive list of Schemes can be found in here. Not all of them are suitable for beginners. You ought to pick one implementation that is well-documented, runs on your operating system of choice, is standards-compliant (see here) and has an interpreter and built-in debugger (see here).

You should also read (and re-read) the current Scheme standard. See here. It is a very short and to-the-point document. At the beginning, you won't understand most of it, but you can still get a general feel for language. As you progress, the standard becomes an invaluable reference document for checking whether a particular concept / construct is covered by the standard and how exactly it is supposed to work.

While reading Scheme book online you may try to run Scheme without installing anything, there are few online REPLs available. But you can also try LIPS Scheme Bookmarklet, that runs Web REPL on any page, so you can test the code while you reading any book. It should even work on PDF files (at least in Chrome).

Is there an Emacs mode for Scheme?

Emacs comes with two Scheme modes. Most people prefer the one that is not the default. To switch to that mode, put something like this into your .emacs file:

 (autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t) 
 (autoload 'run-scheme "cmuscheme" "Switch to interactive Scheme buffer." t) 
 (setq scheme-program-name "name-of-your-scheme-program") 
 (add-hook 'scheme-mode-hook 'turn-on-font-lock) 

The major mode does syntax-highlighting and indentation. The minor mode, invoked with M-x run-scheme, executes a Scheme interpreter in an Emacs buffer. You can evaluate sections of a program in the buffer or type into it directly.

For more advanced syntax-highlighting and indenting, check out the various extensions to the cmuscheme mode at

MIT Scheme includes a specialized mode (mit-scheme.el) that understands some of MIT's extensions and provides a closer integration with the REPL.

Quack ( provides numerous enhancements to Emacs support, works with numerous Scheme implementations, and is a no-brainer install (unless you are using a rare Scheme implementation for which even better REPL integration exists).

You can find descriptions of these modes, as well as some other Emacs packages that provide support for Scheme here.

How can I "pretty-print" Scheme programs?

There are a number of tools available:


The GNU "Any to PostScript" filter. It can produce PostScript for program listings in a variety of languages, including Scheme. See


A PostScript pretty-printer for Scheme. See


The "Literate Programming Utility",allows easy insertions of program source snippets into TeX documents and includes Scheme pretty-printing capabilities. See


SLaTeX is a Scheme program that allows you to insert program code (or code fragments) directly in your LaTeX or plain TeX source. There is also an extension that supports writing SLaTeX documents available at mmm-slatex.el.


The alltt environment in LaTeX supports inserting fixed-width font fragments (i.e. code) into TeX documents. It is fairly plain -- a verbatim environment that understands more of LaTeX's symbols -- but fast and simple: just {{{\usepackage{alltt} }}} and {{{\begin{alltt} }}} ... {{{\end{alltt} }}}.


The noweb literate programming system allows LaTeX documents with multiple code fragments comprised of more than one language (in one document). It also provides tools to extract the executable(s) from the document.