Hope is a small functional programming language developed in the early 1980s prior to Miranda and Haskell. It is notable for being the first language with call-by-pattern evaluation and algebraic data types. Although Hope is no longer used, it is an important language in the development of functional programming.
A Hope tutorial by Roger Bailey was featured in the August 1985 issue of Byte on declarative programming.
A factorial program in Hope is
dec fact : num -> num; --- fact 0 <= 1; --- fact n <= n*fact(n-1);
Unlike in Haskell, changing the order of the clauses would not change the meaning of the program, because Hope's pattern matching always favors more specific patterns over less specific ones.
The first implementation of Hope was strict, but since that one there have been lazy versions and strict versions with lazy constructors.
External links
- Hope homepage
- History of Haskell which mentions Hope being the first language with algebraic data types.
- table of contents of Byte, August 1985