HOME

TheInfoList



OR:

Hope is a small
functional programming language In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that ...
developed in the 1970s at the
University of Edinburgh The University of Edinburgh ( sco, University o Edinburgh, gd, Oilthigh Dhùn Èideann; abbreviated as ''Edin.'' in post-nominals) is a public research university based in Edinburgh, Scotland. Granted a royal charter by King James VI in 158 ...
. 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. It predates Miranda and
Haskell Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lang ...
and is contemporaneous with ML, also developed at the University. Hope was derived from NPL, a simple functional language developed by
Rod Burstall Rodney Martineau "Rod" Burstall FRSE (born 1934) is a British computer scientist and one of four founders of the Laboratory for Foundations of Computer Science at the University of Edinburgh. Biography Burstall studied physics at the Univers ...
and
John Darlington John Darlington is a British academic, researcher and author. He is an Emeritus Professor at Imperial College London. He was Director of the London e-Science Centre and was head of the Functional Programming and Social Computing Sections at Imper ...
in their work on program transformation. NPL and Hope are notable for being the first languages with call-by-pattern evaluation and
algebraic data types In computer programming, especially functional programming and type theory, an algebraic data type (ADT) is a kind of composite type, i.e., a type formed by combining other types. Two common classes of algebraic types are product types (i.e., ...
. Hope was named for 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.


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 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 structures: tuples and lists.


Implementations

The first implementation of Hope was strict, but since that one there have been lazy versions and strict versions with lazy constructors. British Telecom embarked on a project with
Imperial College Imperial College London (legally Imperial College of Science, Technology and Medicine) is a public research university in London, United Kingdom. Its history began with Prince Albert, consort of Queen Victoria, who developed his vision for a cu ...
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 Imperial College London (legally Imperial College of Science, Technology and Medicine) is a public research university in London, United Kingdom. Its history began with Prince Albert, consort of Queen Victoria, who developed his vision for a cu ...
and
International Computers Limited International Computers Limited (ICL) was a British computer hardware, computer software and computer services company that operated from 1968 until 2002. It was formed through a merger of International Computers and Tabulators (ICT), English E ...
(ICL) added annotations to dictate either strict or lazy evaluation.John Kewley and Kevin Glynn. Evaluation Annotations for Hope+. In Kei Davis and R. J. M. Hughes, editors, Functional Programming: Proceedings of the 1989 Glasgow Workshop, Workshops in Computing, pages 329-337, London, UK, 1990. Springer-Verlag. Roger Bailey's Hope tutorial in the August 1985 issue of ''
BYTE The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
'' references an interpreter for
IBM PC DOS IBM PC DOS, an acronym for IBM Personal Computer Disk Operating System, is a discontinued disk operating system for IBM PC compatibles. It was manufactured and sold by IBM from the early 1980s into the 2000s. Developed by Microsoft, it was also ...
2.0.


References


External links


Hope Interpreter for WindowsEntry for Hope in the online Dictionary of Programming Languages
{{DEFAULTSORT:Hope (Programming Language) Functional languages Academic programming languages History of computing in the United Kingdom Statically typed programming languages