PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

HOPE

HOPE

HOPE is a pl created in 1978.

#464on PLDB 44Years Old 145Users
0Books 0Papers

Hope is a small functional programming language developed in the 1970s at Edinburgh University. It predates Miranda and Haskell and is contemporaneous with ML (also developed at Edinburgh). Hope was derived from NPL, a simple functional language developed by Rod Burstall and John Darlington in their work on program transformation. Read more on Wikipedia...


Example from Wikipedia:
dec fact : num -> num; --- fact 0 <= 1; --- fact n <= n*fact(n-1);

Keywords in HOPE

and or not char num div mod dec X # : -> ; --- if then else > <= + ( ) , infix - truval :: nil " <> == in where data ++ lambda

Language features

Feature Supported Example Token
Conditionals
Comments
--- A comment
Line Comments
--- A comment
---
Single-Type Arrays
[1,2,3]
Letter-first Identifiers
Anonymous Functions
lambda(x,y) => x + y
Integers
Infix Notation
max(10,20) + max(1,max(2,3));
Pattern Matching
Merges Whitespace
Semantic Indentation ϴ
While Loops ϴ
rpl.html · hope.html · mupad.html

View source

PLDB - Build the next great programming language · v2022 · Day 33 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com