SETL

From the SETL Wiki

Jump to: navigation, search

SETL is a very-high-level procedural programming language modelled on set theory, created by Jack Schwartz in 1969. There have been various implementations over the years.

SETL was used heavily as a teaching language at New York University throughout the 1970s and 1980s. Though it has not proved popular for production code in commercial applications (as it tends to be slow), it was and still is very useful for prototyping algorithms.

Important features of SETL:

  • Value based. There are no implicit or explicit pointers in SETL. Two variables can never be aliases for the same object.
    • SETL2 however adds class types with implicit pointers (like Java) and closures similar to those of Scheme, and thus is not purely value-based.
  • Small but powerful set of built-in datatypes, including sets, tuples (similar to lists or vectors in other languages) and arbitrary-precision integers.
  • Maps (similar to "hashes" or dictionaries in other languages) are also a built-in type. A map is just a special case of a set, where all elements are pairs. Pairs themselves are a special case of tuples (having two elements each.)
  • Various syntactic luxuries including:
    • Comprehensions, an example of which appears in the "Hello, World" sample on the main page of this wiki. Comprehensions in Python and Haskell were inspired by SETL.
    • Existential and universal quantifiers, arguably more elegant than the equivalents in LISP, Scheme and Haskell (which employ higher-order functions.)

[edit] References

Personal tools