ISWIM facts for kids
Paradigm | Imperative, functional |
---|---|
Designed by | Peter Landin |
First appeared | 1966 |
Influenced by | |
ALGOL 60, Lisp | |
Influenced | |
SASL, Miranda, ML, Haskell, Clean, Lucid |
ISWIM stands for If you See What I Mean. It was an idea for a computer programming language (or a group of similar languages). Peter Landin created it. He first wrote about it in an article in 1966.
Even though ISWIM was never fully built, it was very important. It helped shape many programming languages that came later. This was especially true for functional programming languages. Some examples include SASL, Miranda, ML, and Haskell. It also influenced dataflow programming languages like Lucid.
Contents
What ISWIM Was Like
ISWIM was designed to be an imperative programming language. This means it used step-by-step instructions. But it also had a strong "functional" part, like math functions. It made complex math ideas easier to use in programming.
How It Worked
ISWIM allowed for variables that could change their values. It also had a special control feature called the program point operator. Because it was based on a math system called lambda calculus, ISWIM could use "higher-order functions." These are functions that can work with other functions. It also used "lexically scoped" variables. This means variables only work in specific parts of the code.
Peter Landin wanted ISWIM to look more like math. So, he didn't use semicolons or "begin...end" blocks like some other languages. Instead, he used a system where how you indent (or space out) your code showed how it was organized.
Special Features
A unique part of ISWIM was its use of where
clauses. An ISWIM program was like a single math expression. This expression was explained by where clauses. These clauses added extra definitions, like equations for variables or ways to define functions. ISWIM was one of the first languages to use these where clauses.
ISWIM also let programmers create new types of data. You could describe these new types using a natural language style. This was similar to how modern functional languages define "algebraic data types." ISWIM variables didn't need you to say what type of data they held. It seems Landin wanted it to be "dynamically typed," like LISP. This means the computer figures out the data type as the program runs.
Languages Influenced by ISWIM
No one ever built ISWIM exactly as it was designed. However, its ideas were used in other languages.
Early Languages
Two languages, PAL by Art Evan and Gedanken by John C. Reynolds, used many of Landin's ideas. These languages also allowed for dynamic typing. Robin Milner's ML language is very similar to ISWIM. It just doesn't include the J operator and adds a feature called "type inference." This helps the computer guess the type of data.
Functional Languages
Another path from ISWIM was to remove the parts that dealt with changing variables and the J operator. This created purely functional languages. These languages could also use "lazy evaluation." This means they only calculate things when they are actually needed. This idea led to many important functional programming languages. These include SASL, Kent Recursive Calculator (KRC), Hope, Miranda, Haskell, and Clean.