Description #
Scheme is a minimalist dialect of Lisp that emphasizes simplicity, elegant syntax, and clean semantics. It supports first-class procedures, lexical scoping, tail recursion, and a small set of core language features—making it ideal for teaching functional programming and language design.
History #
Scheme was developed in the 1970s by Guy L. Steele and Gerald Jay Sussman at MIT. It was designed as a simpler alternative to Common Lisp and became widely adopted in computer science education. Its influence extends to languages like JavaScript, Lua, and Racket.
Hello World Code #
(display "Hello, World!")
(newline)
How to Run #
Option 1: Online
- Try Scheme – repl.it
- Racket Online IDE (uses a Scheme-compatible environment)
Option 2: Local
- Install Racket or MIT Scheme:
sudo apt install mit-scheme
Save as hello.scm
and run:
scheme --script hello.scm
Key Concepts #
- Lexical scoping
- First-class procedures (functions)
- Tail call optimization
- Minimal core syntax
- Prefix notation with s-expressions
- Recursion over iteration
- REPL-based development
- Hygienic macros
- Continuations (
call/cc
) - Strong influence on modern languages
Try It Online #
Fun Facts #
- Scheme is often used in introductory computer science courses (e.g., SICP at MIT).
- The first version of JavaScript was heavily inspired by Scheme.
- Scheme introduced the
call-with-current-continuation
(call/cc) feature.