Hope (programming language)

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search

Hope is a small functional programming language developed in the 1970s at Edinburgh University[1]. It predates Miranda and Haskell and is contemporaneous with ML (also developed at Edinburgh). It is notable for being the first language with call-by-pattern evaluation and algebraic data types. Hope is an important language in the development of functional programming.

The name may have been derived from Hope Park Square in Edinburgh, at one time the location of the Department of Artificial Intelligence.

A Hope tutorial by Roger Bailey was featured in the August 1985 issue of Byte on declarative programming [2].

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.

Another way in which Hope differs from Haskell and ML is that explicit type declarations in Hope are required: There is no option to use a type-inference algorithm in Hope.

The first implementation of Hope was strict, but since that one there have been lazy versions and strict versions with lazy constructors (the language described in [1] has a lazy constructor for lists only).

References

  1. 1.0 1.1 Burstall R.M, McQueen D.B, Sanella D.T. (1980) Hope: An Experimental Applicative Language. Conference Record of the 1980 LISP Conference, Stanford University, pp. 136-143.
  2. http://www.devili.iki.fi/library/issue/136.en.html

External links


ru:Hope (язык программирования)

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...