ISWIM
Encyclopedia
ISWIM is an abstract computer programming language
(or a family of programming languages) devised by Peter J. Landin
and first described in his article, The Next 700 Programming Languages, published in the Communications of the ACM
in 1966. The acronym stands for "If you See What I Mean" (also said to have stood for "I See What You Mean", but ISWYM was mistyped as ISWIM.)
Although not implemented, it has proved very influential in the development of programming languages, especially functional programming
languages such as SASL
, Miranda
, ML
, Haskell
and their successors.
ISWIM is an imperative language with a functional core, consisting of a syntactic sugar
ing of lambda calculus
to which are added mutable variables and assignment and a powerful control mechanism — the J operator
. Being based on lambda calculus ISWIM has higher order functions and lexically scoped variables.
The operational semantics of ISWIM are defined using Landin's SECD machine
and use call-by-value, that is eager evaluation
. A goal of ISWIM was to look more like mathematical notation, so Landin abandoned ALGOL's semicolons between statements and
and scoping based on indentation.
A notationally distinctive feature of ISWIM is its use of where clauses. An ISWIM program is a single expression qualified by 'where' clauses (auxiliary definitions including equations among variables), conditional expressions and function definitions. With CPL, ISWIM was one of the first programming languages to use 'where' clauses.
A notable semantic feature was the ability to define new data types, as a (possibly recursive) sum of products - this was done using a somewhat verbose natural language style description, but apart from notation amounts exactly to the algebraic data types found in modern functional languages. ISWIM variables did not have explicit type declarations and it seems likely (although not explicitly stated in the 1966 paper) that Landin intended the language to be dynamically typed, like LISP and unlike ALGOL; but it is also just possible that he had in mind to develop some form of type inference
.
No direct implemention of ISWIM was attempted but Art Evan's PAL and John C. Reynolds
' Gedanken captured most of Landin's concepts including powerful transfer-of-control operations. Both of these were dynamically typed. Milner's ML
may be considered equivalent to ISWIM without the J operator and with type inference.
Another line of descent from ISWIM is to strip out the imperative features (assignment and the J operator) leaving a purely functional language. It then becomes possible to switch to lazy evaluation
. This path led to programming languages SASL, KRC
(Kent Recursive Calculator), Hope, Miranda, Haskell
, and Clean.
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
(or a family of programming languages) devised by Peter J. Landin
Peter J. Landin
Peter John Landin was a British computer scientist. He was one of the first to realize that the lambda calculus could be used to model a programming language, an insight that is essential to development of both functional programming and denotational semantics.- Academic :Landin was born in...
and first described in his article, The Next 700 Programming Languages, published in the Communications of the ACM
Communications of the ACM
Communications of the ACM is the flagship monthly journal of the Association for Computing Machinery . First published in 1957, CACM is sent to all ACM members, currently numbering about 80,000. The articles are intended for readers with backgrounds in all areas of computer science and information...
in 1966. The acronym stands for "If you See What I Mean" (also said to have stood for "I See What You Mean", but ISWYM was mistyped as ISWIM.)
Although not implemented, it has proved very influential in the development of programming languages, especially functional programming
Functional programming
In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state...
languages such as SASL
SASL programming language
SASL is a purely functional programming language developed by David Turner at the University of St Andrews in 1972, based on the applicative subset of ISWIM. In 1976 Turner redesigned and reimplemented it as a non-strict language...
, Miranda
Miranda programming language
Miranda is a non-strict purely functional programming language designed by David Turner as a successor to his earlier programming languages SASL and KRC, using some concepts from ML and Hope. It was produced by Research Software Ltd...
, ML
ML programming language
ML is a general-purpose functional programming language developed by Robin Milner and others in the early 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM...
, Haskell
Haskell (programming language)
Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the...
and their successors.
ISWIM is an imperative language with a functional core, consisting of a syntactic sugar
Syntactic sugar
Syntactic sugar is a computer science term that refers to syntax within a programming language that is designed to make things easier to read or to express....
ing of lambda calculus
Lambda calculus
In mathematical logic and computer science, lambda calculus, also written as λ-calculus, is a formal system for function definition, function application and recursion. The portion of lambda calculus relevant to computation is now called the untyped lambda calculus...
to which are added mutable variables and assignment and a powerful control mechanism — the J operator
Peter Landin's J operator
In computer science, Peter Landin's J operator is a programming construct that post-composes a lambda expression with the continuation to the current lambda-context...
. Being based on lambda calculus ISWIM has higher order functions and lexically scoped variables.
The operational semantics of ISWIM are defined using Landin's SECD machine
SECD machine
The SECD machine is a highly influential virtual machine and abstract machine intended as a target for functional programming language compilers. The letters stand for Stack, Environment, Code, Dump, the internal registers of the machine...
and use call-by-value, that is eager evaluation
Eager evaluation
In computer programming, eager evaluation or greedy evaluation is the evaluation strategy in most traditional programming languages. In eager evaluation an expression is evaluated as soon as it gets bound to a variable. The term is typically used to contrast lazy evaluation, where expressions are...
. A goal of ISWIM was to look more like mathematical notation, so Landin abandoned ALGOL's semicolons between statements and
begin ... end
blocks and replaced them with the off-side ruleOff-side rule
A computer programming language is said to adhere to the off-side rule if the scope of declarations in that language is expressed by their indentation. The term and the idea are attributed to Peter J. Landin, and the term can be seen as a pun on the offside law of football .- Definition :Peter J...
and scoping based on indentation.
A notationally distinctive feature of ISWIM is its use of where clauses. An ISWIM program is a single expression qualified by 'where' clauses (auxiliary definitions including equations among variables), conditional expressions and function definitions. With CPL, ISWIM was one of the first programming languages to use 'where' clauses.
A notable semantic feature was the ability to define new data types, as a (possibly recursive) sum of products - this was done using a somewhat verbose natural language style description, but apart from notation amounts exactly to the algebraic data types found in modern functional languages. ISWIM variables did not have explicit type declarations and it seems likely (although not explicitly stated in the 1966 paper) that Landin intended the language to be dynamically typed, like LISP and unlike ALGOL; but it is also just possible that he had in mind to develop some form of type inference
Type inference
Type inference refers to the automatic deduction of the type of an expression in a programming language. If some, but not all, type annotations are already present it is referred to as type reconstruction....
.
No direct implemention of ISWIM was attempted but Art Evan's PAL and John C. Reynolds
John C. Reynolds
John C. Reynolds is an American computer scientist.John Reynolds studied at Purdue University and then earned a PhD in theoretical physics from Harvard University in 1961. He was Professor of Information science at Syracuse University from 1970 to 1986. Since then he has been Professor of Computer...
' Gedanken captured most of Landin's concepts including powerful transfer-of-control operations. Both of these were dynamically typed. Milner's ML
ML programming language
ML is a general-purpose functional programming language developed by Robin Milner and others in the early 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM...
may be considered equivalent to ISWIM without the J operator and with type inference.
Another line of descent from ISWIM is to strip out the imperative features (assignment and the J operator) leaving a purely functional language. It then becomes possible to switch to lazy evaluation
Lazy evaluation
In programming language theory, lazy evaluation or call-by-need is an evaluation strategy which delays the evaluation of an expression until the value of this is actually required and which also avoids repeated evaluations...
. This path led to programming languages SASL, KRC
Kent Recursive Calculator
KRC is a lazy functional language developed by David Turner in 1981 based on SASL, with pattern matching, guards and ZF expressions ....
(Kent Recursive Calculator), Hope, Miranda, Haskell
Haskell (programming language)
Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the...
, and Clean.