NPL is a
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 m ...
with
pattern matching
In computer science, pattern matching is the act of checking a given sequence of tokens for the presence of the constituents of some pattern. In contrast to pattern recognition, the match usually has to be exact: "either it will or will not be ...
designed 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 Universi ...
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 1977. The language allows certain sets and logic constructs to appear on the right hand side of definitions, e.g.
setofeven(X) <= <:x: x in X & even(x) :>
The NPL interpreter evaluates the list of generators from left to right so conditions can mention any bound variables that occur to their left. These were known as
set comprehensions. NPL eventually evolved into
Hope
Hope is an optimistic state of mind that is based on an expectation of positive outcomes with respect to events and circumstances in one's life or the world at large.
As a verb, its definitions include: "expect with confidence" and "to cherish ...
but lost set comprehensions, which made a reappearance in the form of
list comprehension
A list comprehension is a Syntax of programming languages, syntactic construct available in some programming languages for creating a list based on existing list (computing), lists. It follows the form of the mathematical ''set-builder notation'' ( ...
s in later functional languages.
References
* John Darlington (1977). "Program Transformation and Synthesis: Present Capabilities". Research Report No. 77/43, Dept. of Computing and Control, Imperial College of Science and Technology, London.
Academic programming languages
Functional languages
History of computing in the United Kingdom
{{compu-lang-stub