Hope (programming language): Difference between revisions

Content deleted Content added
LittleDan (talk | contribs)
big expansion
Line 1:
'''Hope''' is a small [[functional (programming)|functional]] [[programming language]], with [[strongly-typed programming languages|strong]] [[polymorphism (computer science)|polymorphic typing]], [[algebraic typesdatatypes]], [[pattern matching]], and [[higher-order functions]]. It has [[call-by-pattern evaluation]]. The first implementation of Hope was strict, but since that one there have been lazy semanticsversions and strict versions with lazy constructors. Hope is [[purely functional]].
 
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.
 
==External link==
*[http://www.soi.city.ac.uk/~ross/Hope/ Hope homepage]
 
{{compu-lang-stub}}
[[Category:Functional languages]]