This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(December 2011) (Learn how and when to remove this message) |
| ISWIM | |
|---|---|
| Paradigms | imperative,functional |
| Designed by | Peter Landin |
| First appeared | 1966; 60 years ago (1966) |
| Scope | lexical |
| Influenced by | |
| ALGOL 60,Lisp | |
| Influenced | |
| PAL,SASL,Miranda,ML,Haskell,Clean,Lucid | |
ISWIM (If You See What I Mean) is an abstract computerprogramming language (or a family of languages) devised byPeter Landin and first described in his article "The Next 700 Programming Languages", published in theCommunications of the ACM in 1966.[1]
Although not implemented, it has proved very influential in the development of programming languages, especiallyfunctional programming languages such asSASL,Miranda,ML,Haskell and their successors, anddataflow programming languages likeLucid.
ISWIM is animperative programming language with a functional core, consisting of asyntactic sugaring oflambda calculus to which are added mutable variables and assignment and a powerful control mechanism: theprogram point operator. Being based on lambda calculus, ISWIM hashigher-order functions andlexically scoped variables.
The operational semantics of ISWIM are defined using Landin'sSECD machine and use call-by-value, that iseager evaluation.[2] A goal of ISWIM was to look more like mathematical notation, so Landin abandonedALGOL's semicolons between statements andbegin ...end blocks and replaced them with theoff-side rule and scoping based onindentation.
A notationally distinctive feature of ISWIM is its use ofwhere clauses. An ISWIM program is a single expression qualified bywhere clauses (auxiliary definitions including equations among variables), conditional expressions and function definitions. Along withCPL, ISWIM was one of the first programming languages to usewhere clauses.[3]
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 thealgebraic data types found in modern functional languages.[4] 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 unlikeALGOL; but it is also possible that he intended to develop some form oftype inference.
No direct implementation of ISWIM was completed but Art Evan's languagePAL,[5] andJohn C. Reynolds' languageGedanken,[6] captured most of Landin's concepts, including powerful transfer-of-control operations. Both of these weretyped dynamically.Robin Milner'sML may be considered equivalent to ISWIM without theJ operator and withtype inference.
Another line of descent from ISWIM is to strip out the imperative features (assignment and the J operator) leaving a purely functional language.[7] It then becomes possible to switch tolazy evaluation. This path led to programming languagesSASL,Kent Recursive Calculator (KRC),Hope,Miranda,Haskell, andClean.
The ISWIM paper also has the first appearance of algebraic type definitions used to define structures. This is done in words, but the sum-of-products idea is clearly there