'''Hope''' is a small [[functional programming language]] based on [[functional programming]] developed in the 1970s at the [[University of Edinburgh]].<ref name="BMS">[[Rod{{cite book Burstall|last1=Burstall |first1=R. M]],. |author1-link=Rod Burstall |last2=MacQueen |first2=D. B,. |last3=Sannella |first3=D. T. (|date=1980) ''|chapter=Hope: An Experimental Applicative Language''. |title=Conference Record of the 1980 LISP Conference, |place=Stanford University, pp.Stanford, 136-143.California, United States |page=136–143}}</ref><ref>
{{cite book |last1=Bailey |first1=Roger |date=1 April 1990 |title=Functional Programming with Hope |series=Ellis Horwood Series in Computers and Their Applications |publisher=Ellis Horwood Ltd}}</ref>
{{cite book
It predates [[Miranda (programming language)|Miranda]] and [[ Haskell (programming language)|Haskell]] and is contemporaneous with [[ML (programming language)|ML]], also developed at the University. Hope was derived from [[NPL (programming language)|NPL]],<ref name="design"/> a simple functional language developed by [[Rod Burstall]] and [[John Darlington]] in their work on program transformation.<ref> {{cite journal |last1=Burstall |first1=R. M. |author1-link=Rod Burstall and|last2=Darlington |first2=J. |author2-link=John Darlington . |date=1977 |title=A transformation system for developing recursive programs . |journal=Journal of the Association for Computing Machinery , |volume=24 ( |issue=1 ):44–67 (1977)|pages=44–67}}</ref> NPL and Hope are notable for being the first languages with call-by-pattern evaluation and [[algebraic data typestype]] s.<ref>{{Cite book |last1=Hudak |first1=Paul |author1-link=Paul Hudak |last2=Hughes |first2=John |author2-link=John Hughes (computer scientist) |last3=Peyton Jones |first3=Simon |author3-link=Simon Peyton Jones |last4=Wadler |first4=Philip |author4-link=Philip Wadler |date=2007-06-09 |title=A history of Haskell: being lazy with class |publisher=ACM |pages=12–1 |doi=10.1145/1238844.1238856 |isbn=9781595937667 |s2cid=52847907}}</ref> ▼
| title = Functional Programming with Hope
| series = Ellis Horwood Series in Computers and Their Applications
| last = Bailey
| first = Roger
| publisher = Ellis Horwood Ltd
| date = 1 April 1990
}}</ref>
▲It predates [[Miranda (programming language)|Miranda]] and [[Haskell (programming language)|Haskell]] and is contemporaneous with [[ML (programming language)|ML]], also developed at the University. Hope was derived from [[NPL (programming language)|NPL]],<ref name="design"/> a simple functional language developed by [[Rod Burstall]] and [[John Darlington]] in their work on program transformation.<ref>R.M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the Association for Computing Machinery, 24(1):44–67 (1977)</ref> NPL and Hope are notable for being the first languages with call-by-pattern evaluation and [[algebraic data types]].<ref>{{Cite book|last1=Hudak|first1=Paul|last2=Hughes|first2=John|last3=Peyton Jones|first3=Simon|last4=Wadler|first4=Philip|date=2007-06-09|title=A history of Haskell: being lazy with class|publisher=ACM|pages=12–1|doi=10.1145/1238844.1238856|isbn=9781595937667|s2cid=52847907}}</ref>
Hope was named for [[Sir Thomas Hope, 8th Baronet|Sir Thomas Hope]] (c. 1681–1771), a Scottish agricultural reformer, after whom ''Hope Park Square'' in Edinburgh, the ___location of the Department of Artificial Intelligence at the time of the development of Hope, was also named.
--- fact n <= n*fact(n-1);
Changing the order of the clauses does not change the meaning of the program, because Hope's pattern matching always favors more specific patterns over less specific ones. Explicit type[[Declaration (computer programming)|declarations]] of [[data type]]s in Hope are required; there is no option to use a [[type- inference]] algorithm in Hope.
Hope provides two built-in [[data structuresstructure]]s: tuples[[tuple]]s and [[List (abstract data type)|lists]].<ref name=byte/>
==Implementations==
The first implementation of Hope wasused [[strict evaluation|strict]], but since that one there have been [[lazy evaluation|lazy]] versions and strict versions with lazy constructors. [[BT Group|British Telecom]] embarked on a project with [[Imperial College London|Imperial College]] to implement a strict version. The first release was coded by Thanos Vassilakis in 1986. Further releases were coded by Mark Tasng of British Telecom. A successor language Hope+ (developed jointly between [[Imperial College]] and [[International Computers Limited]] (ICL) added annotations to dictate either strict or lazy evaluation.<ref name=annotations>John{{cite book |last1=Kewley and|first1=John |last2=Glynn |first2=Kevin Glynn.|date=1989 |chapter=Evaluation Annotations for Hope+. In|editor1-last=Davis |editor1-first=Kei Davis and|editor2-last=Hughes |editor2-first=R. J. M. Hughes, editors, |title=Functional Programming: Proceedings of the 1989 Glasgow Workshop, Workshops in Computing, |pages=329–337 329-337, |place=London, UK,United Kingdom |publication-date=1990. |publisher=[[Springer-Verlag.]]}}</ref>
Roger Bailey's Hope tutorial in the August 1985 issue of ''[[Byte (magazine)|BYTEByte]]'' references an [[Interpreter (computing)|interpreter]] for [[IBM PC DOS]] 2.0.<ref name=byte/>
==References==
{{Reflist|refs=
<ref name="design">{{cite conference |last1=Burstall |first1=R. M. |author1-link=Rod Burstall. |date=1977 |title=Design considerations for a functional programming language. Invited(invited paper,) Proc.|conference=Proceedings Infotech State of the Art Conf.Conference “The"The Software Revolution”,Revolution" |place=Copenhagen, |pages=45–57 (1977)}}</ref>
<ref name=byte>{{cite magazine |last1=Bailey |first1=Roger |date=August 1985 |url=https://archive.org/stream/BYTE_Vol_10-08_1985-08_The_Amiga#page/n241/mode/2up |title=A Hope Tutorial |magazine=[[Byte (magazine)|Byte]] |volume=10 |issue=8 |page=235–258 |access-date=1 April 2015}}</ref>
<ref name=byte>
{{cite magazine
| title = A Hope Tutorial
| last = Bailey
| first = Roger
| magazine = [[Byte magazine|BYTE]]
| volume = 10
| issue = 8
| date = August 1985
| url = https://archive.org/stream/BYTE_Vol_10-08_1985-08_The_Amiga#page/n241/mode/2up
| access-date = 1 April 2015
}}</ref>
}}
[[Category:Statically typed programming languages]]
[[Category:University of Edinburgh]]
<!-- Hidden categories below -->
[[Category:Articles with example code]]
|