Scheme Programming Language Article Index for
Scheme
Shopping
Scheme
Website Links For
Scheme
 

Information About

Scheme Programming Language




  paradigm , Procedural
  year 1970s
  designer Guy L Steele and Gerald Jay Sussman
  typing strong, dynamic
  dialects many
  implementations PLT Scheme , MIT Scheme , Scheme48 , Guile
  influenced By Lisp , ALGOL
  influenced Common Lisp


Scheme is a Functional Programming Language and a Dialect of Lisp . It was developed by Guy L. Steele and Gerald Jay Sussman in the 1970s , initially as an attempt to understand the Actor Model . Scheme was introduced to the academic world via a series of papers now referred to as Sussman and Steele's Lambda Papers . Implementations tend to differ in minor details, so sometimes Scheme is referred to as a family of closely related programming languages.

Scheme's philosophy is unashamedly Minimalist . Its philosophy is that "programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary." Therefore, Scheme provides as few primitive notions as possible, and where this is practical in an implementation, tends to let everything else be provided by Programming Libraries that are built on top of them. For example, the main mechanism for expressing repetition is Tail Recursion .

Scheme was the first dialect of Lisp to choose static (a.k.a. lexical) over dynamic variable Scope . It was also one of the first programming languages to support explicit Continuation s. Scheme also supports Garbage Collection of unreferenced data.

Scheme uses lists as the primary data structure, but also has support for Vectors . Owing to the minimalist specification, there is no standard syntax for creating structures with named fields, or for doing Object Oriented Programming , but many individual implementations have such features.


ORIGIN OF SCHEME


' recursive emblem celebrates Scheme's theoretical foundation, the Lambda Calculus . Y in the emblem refers to the Fixed Point Combinator and the reappearance of the picture in itself refers to the Recursion .]]

In their paper on the evolution of Lisp, Richard Gabriel and Guy Steele explain the origin of Scheme as follows:

"The dialect of Lisp known as Scheme was originally an attempt by Gerald Jay Sussman and Guy Steele during Autumn 1975 to explicate for themselves some aspects of Carl Hewitt’s theory of Actors As A Model Of Computation . Hewitt’s model was object-oriented (and influenced by Smalltalk ); every object was a computationally active entity capable of receiving and reacting to messages. The objects were called actors, and the messages themselves were also actors. An actor could have arbitrarily many acquaintances; that is, it could “know about” (in Hewitt’s language) other actors and send them messages or send acquaintances as (parts of) messages. Message-passing was the only means of interaction. Functional interactions were modeled with the use of Continuations ; one might send the actor named “ Factorial ” the number 5 and another actor to which to send the eventually computed value (presumably 120)."


"Sussman and Steele had some trouble understanding some of the consequences of the model from Hewitt’s papers and language design, so they decided to construct a toy implementation of an actor language in order to experiment with it. Using Maclisp as a working environment, they decided to construct a tiny Lisp interpreter and then add the necessary mechanisms for creating actors and sending messages. The toy Lisp would provide the necessary primitives for implementing the internal behavior of primitive actors."


Scheme was originally called "Schemer", in the tradition of other Lisp-derived languages like Planner or Conniver . The current name resulted from the authors' use of the ITS Operating System , which limited filenames to two components of at most six characters each. Currently, "Schemer" is commonly used to refer to a Scheme programmer.


ADVANTAGES

Scheme, as all Lisp dialects, has very little syntax compared to many other programming languages. It has no Operator Precedence rules because Fully Nested Notation is used for all function calls, and so there are no ambiguities as are found in Infix Notation , which mimics conventional algebraic notation.

Some people are at first put off by all the parentheses used in Scheme notation. However, Scheme is usually processed and displayed using editors which Automatically Indent the code in a conventional manner, and after a short period of acclimation the parentheses become unobtrusive. R6RS, the next version of the Scheme Standard , will specify that square brackets (and possibly curly braces) may be used for S-expressions. Some people find this easier to read and write while others find it harder.

Scheme's Macro facilities allow it to be adapted to many different problem domains. They can be used to add support for new paradigms, like Object-oriented Programming , Logic Programming , etc. Scheme provides a Hygienic Macro system which, while not quite as powerful as Common Lisp's macro system, is much safer and often easier to work with. The advantage of a hygienic macro system (as found in Scheme and other languages such as Dylan ) is that any name clashes in the macro and surrounding code will be automatically avoided. The hygienic macro system is usually built on some low-level facility which provides the full power of non-hygienic macros, including arbitrary syntax-time computations.

Scheme encourages Functional Programming . Purely Functional programs have no state and don't have Side-effects , and are therefore automatically Thread-safe and considerably easier to Verify than Imperative Programs .

Scheme, as in other functional languages, provides a natural way of taking advantage of parallel machine architecture.

In Scheme, functions are First-class Object s. This allows for Higher-order Function s which can further abstract program logic. Functions can also be created anonymously.

Scheme has a minimalistic standard. While this can be seen as a disadvantage, it can also be valuable. For example, writing a conforming Scheme compiler is easier (since there are fewer features to implement) than a Common Lisp one; embedding '' (that is, about 50 pages).


DISADVANTAGES

The Scheme standard is very minimalist, specifying only the core language. This means that there are many different implementations, each with their own extensions to the language and libraries. The ''Scheme Requests for Implementation'' ( SRFI ) process has done much to remedy this.

The Scheme community is still somewhat fragmented, and some libraries only work in specific implementations.

Some Common Lispers see functions and variables declared in the same namespace as a disadvantage, since that makes it impossible to use the same name for a function and a separate variable in the same scope, while many Scheme programmers (and a few Common Lispers, who prefer CL for other reasons) see this as an advantage, since it makes use of higher-order functions easier. The two communities often engage in lengthy disagreements over such issues.


STANDARDS

There are two standards that define the Scheme language: the official IEEE standard, and a de facto standard called the ''Revisedn Report on the Algorithmic Language Scheme'', nearly always abbreviated R''n''RS, where ''n'' is the number of the revision. The latest R''n''RS version is R5RS, also available online .

A new language standardization process was begun at the 2003 Scheme workshop that has the remit of producing an R6RS standard in 2006. It breaks with the earlier RnRS approach of unanimity. Their current progress can be found on the web .

Possibly the most important new feature in R6RS will be a standard module system (currently being designed). This will allow a split between the core language and libraries.


LANGUAGE ELEMENTS


Comments