LLMpediaThe first transparent, open encyclopedia generated by LLMs

Scheme (programming language)

Generated by DeepSeek V3.2
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy

No expansion data.

Scheme (programming language)
NameScheme
ParadigmFunctional, procedural, meta
Year0 1975
DesignerGuy L. Steele, Gerald Jay Sussman
TypingDynamic, strong, latent
ImplementationsChez Scheme, GNU Guile, Racket, MIT/GNU Scheme
Influenced byLisp, ALGOL
InfluencedCommon Lisp, Racket, JavaScript, Ruby, Julia

Scheme (programming language). Scheme is a minimalist, multi-paradigm dialect of the Lisp family, renowned for its elegant design and emphasis on functional programming. It was created in the 1970s at the MIT Artificial Intelligence Laboratory by Guy L. Steele and Gerald Jay Sussman. The language is characterized by its small core, lexical scoping, and powerful macro system, which have made it a highly influential tool in computer science education and programming language research.

History

The development of Scheme began in 1975, emerging from research at the MIT Artificial Intelligence Laboratory. Its principal creators, Guy L. Steele and Gerald Jay Sussman, designed it as a clean, simplified alternative to the dominant Lisp dialects of the era, such as Maclisp. A seminal publication, the "Lambda Papers" co-authored by Steele and Sussman, explored foundational concepts like continuations and the Actor model. The language's evolution was significantly guided by a series of standards, known as the Revised Reports, starting with the seminal "Revised Report on the Algorithmic Language Scheme" in 1978. Key institutions in its early development and standardization included the MIT and Indiana University.

Language features

Scheme is defined by a small set of orthogonal features. It employs lexical scoping and first-class closures, which became a model for later languages like JavaScript and Ruby. Its homoiconic nature, where code is represented as data, enables a powerful macro system for metaprogramming, influencing languages such as Rust. The language treats continuations as first-class objects, providing exceptional control over program flow. Other core features include tail-call optimization, a single namespace, and a simple, uniform syntax based on S-expressions.

Standards and implementations

The language is formally defined by a series of standard reports. The most widely recognized are the IEEE 1178-1990 standard and the successive Revised Reports, including R5RS and R7RS. Numerous implementations exist, each with different emphases. Chez Scheme, developed by Cisco, is renowned for its performance. GNU Guile serves as the official extension language for the GNU Project. Racket, originating from PLT Scheme, is a major platform for language-oriented programming. Other significant implementations include MIT/GNU Scheme, Chicken, and Gambit.

Example code

A classic example is the recursive calculation of the factorial function, demonstrating Scheme's functional style. ```scheme (define (factorial n) (if (= n 0) 1 (* n (factorial (- n 1))))) ``` The language's macro capability is illustrated by defining a simple looping construct, showcasing its metaprogramming power. ```scheme (define-syntax for (syntax-rules () ((for (var start stop) body ...) (let loop ((var start)) (when (< var stop) body ... (loop (+ var 1))))))) ```

Influence and adoption

Scheme has had a profound impact on both academic computer science and industrial programming language design. It served as a foundational teaching language in renowned curricula, including the famous SICP textbook used at the MIT. Its concepts directly influenced the design of Common Lisp, Racket, and JavaScript. Elements of its macro system appear in Rust and Julia. While not as ubiquitous in industry as Python or Java, it remains a vital tool for research in compilers, language design, and automated reasoning, with active communities around implementations like Racket and GNU Guile.

Category:Programming languages Category:Lisp programming language family Category:Functional languages