Content deleted Content added
→Language details: markup (using plausible lang) |
m Wikipedia cross reference to Don Sannella |
||
(28 intermediate revisions by 13 users not shown) | |||
Line 1:
{{Infobox programming language
'''Hope''' is a small [[functional programming language]] developed in the 1970s at the [[University of Edinburgh]].<ref name="BMS">[[Rod Burstall|Burstall R.M]], MacQueen D.B, Sannella D.T. (1980) ''Hope: An Experimental Applicative Language''. Conference Record of the 1980 LISP Conference, Stanford University, pp. 136-143.</ref><ref>▼
| name = Hope
| logo = <!-- Filename -->
| logo caption =
| screenshot = <!-- Filename -->
| screenshot caption =
| sampleCode =
| paradigm = [[Functional programming|functional]]
| designers = [[Rod Burstall]]<br>D. B. MacQueen<br>[[Don Sannella]]
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|last=Hudak|first=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}}</ref>▼
| developer =[[University of Edinburgh]]
| released = {{Start date and age|1980}}
| latest release version =
| latest release date = <!-- {{Start date and age|199y|mm|dd|df=yes}} -->
| typing =
| memory management =
| scope =
| programming language =
| discontinued = Yes
| platform =
| operating system =
| license =
| file ext =
| file format = <!-- or: | file formats = -->
| website = <!-- {{URL|www.example.com}} -->
| implementations =
| dialects = Hope+
| influenced by = [[NPL (programming language)|NPL]]
| influenced =
}}
▲'''Hope''' is a
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.▼
{{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>
▲It predates [[Miranda (programming language)|Miranda]] and [[
▲Hope was named for [[Sir Thomas Hope, 8th Baronet|Sir Thomas Hope]] (c. 1681–1771), a Scottish
The first implementation of Hope used [[strict evaluation]], but there have since been [[lazy evaluation]] versions and strict versions with lazy constructors. A successor language Hope+, developed jointly between [[Imperial College]] and [[International Computers Limited]], added annotations to dictate either strict or lazy evaluation.<ref name=annotations>{{cite book |last1=Kewley |first1=John |last2=Glynn |first2=Kevin |date=1989 |chapter=Evaluation Annotations for Hope+ |editor1-last=Davis |editor1-first=Kei |editor2-last=Hughes |editor2-first=R. J. M. |title=Functional Programming: Proceedings of the 1989 Glasgow Workshop, Workshops in Computing |pages=329–337 |place=London, United Kingdom |publication-date=1990 |publisher=[[Springer-Verlag]]}}</ref>
==Language details==
A [[factorial]] program in Hope is:
dec fact : num -> num;▼
--- fact 0 <= 1;▼
--- fact n <= n*fact(n-1);▼
Changing the order of
▲dec fact : num -> num;
▲--- fact 0 <= 1;
▲--- 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 declarations in Hope are required; there is no option to use a type-inference algorithm in Hope.
Hope provides two built-in [[data
==Implementations==
==References==
{{Reflist|refs=
<ref name="design">{{cite conference |last1=Burstall |first1=R. M. |author1-link=Rod Burstall
<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=13 January 2025}}</ref>
▲| issue = 8
}}
==External links==
*[https://web.archive.org/web/20130801064002/http://www.hopemachine.co.uk/ Hope Interpreter for Windows]
*[http://cgibin.erols.com/ziring/cgi-bin/cep/cep.pl?_key=Hope Entry in the online Dictionary of Programming Languages]
{{Authority control}}
{{DEFAULTSORT:Hope (Programming Language)}}
Line 54 ⟶ 68:
[[Category:History of computing in the United Kingdom]]
[[Category:Statically typed programming languages]]
[[Category:University of Edinburgh]]
<!-- Hidden categories below -->
[[Category:Articles with example code]]
|