HOME

TheInfoList



OR:

CPL (Combined Programming Language) is a
multi-paradigm programming language Programming languages can be grouped by the number and types of Programming paradigm, paradigms supported. Paradigm summaries A concise reference for the programming paradigms listed in this article. * Concurrent programming language, Concurrent ...
developed in the early 1960s. It is an early ancestor of the
C language C (''pronounced'' '' – like the letter c'') is a general-purpose programming language. It was created in the 1970s by Dennis Ritchie and remains very widely used and influential. By design, C's features cleanly reflect the capabilities o ...
via the
BCPL BCPL ("Basic Combined Programming Language") is a procedural, imperative, and structured programming language. Originally intended for writing compilers for other languages, BCPL is no longer in common use. However, its influence is still f ...
and B languages.


Design

CPL was developed initially at the Mathematical Laboratory at the
University of Cambridge The University of Cambridge is a Public university, public collegiate university, collegiate research university in Cambridge, England. Founded in 1209, the University of Cambridge is the List of oldest universities in continuous operation, wo ...
as the "Cambridge Programming Language" and later published jointly between Cambridge and the
University of London The University of London (UoL; abbreviated as Lond or more rarely Londin in Post-nominal letters, post-nominals) is a collegiate university, federal Public university, public research university located in London, England, United Kingdom. The ...
Computer Unit as the "Combined Programming Language" (CPL was also nicknamed by some as "Cambridge Plus London" or "Christopher's Programming Language").
Christopher Strachey Christopher S. Strachey (; 16 November 1916 – 18 May 1975) was a British computer scientist. He was one of the founders of denotational semantics, and a pioneer in programming language design and computer time-sharing.F. J. Corbató, et al., T ...
, David Barron and others were involved in its development. The first paper describing it was published in 1963, while it was being implemented on the
Titan Computer Titan most often refers to: * Titan (moon), the largest moon of Saturn * Titans, a race of deities in Greek mythology Titan or Titans may also refer to: Arts and entertainment Fictional entities Fictional locations * Titan in fiction, fiction ...
at Cambridge and the Atlas Computer at London. It was heavily influenced by
ALGOL 60 ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a ...
, but instead of being extremely small, elegant and simple, CPL was intended for a wider application area than scientific calculations and was therefore much more complex and not as elegant as ALGOL 60. CPL was a big language for its time. CPL attempted to go beyond ALGOL to include industrial process control, business data processing and possibly some early command line games. CPL was intended to allow low-level programming and high level abstractions using the same language. However, CPL was only implemented very slowly. The first CPL compiler was probably written about 1970, but the language never gained much popularity and seems to have disappeared without trace sometime in the 1970s.
BCPL BCPL ("Basic Combined Programming Language") is a procedural, imperative, and structured programming language. Originally intended for writing compilers for other languages, BCPL is no longer in common use. However, its influence is still f ...
(for "Basic CPL", although originally "Bootstrap CPL") was a much simpler language based on CPL intended primarily as a
systems programming Systems programming, or system programming, is the activity of programming computer system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims t ...
language, particularly for writing
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
s; it was first implemented in 1967, prior to CPL's first implementation. BCPL then led, via B, to the popular and influential
C programming language C (''pronounced'' '' – like the letter c'') is a general-purpose programming language. It was created in the 1970s by Dennis Ritchie and remains very widely used and influential. By design, C's features cleanly reflect the capabilities of ...
.


Example

The function MAX as formulated by Peter Norvig:
Max(Items, ValueFunction) = value of
§ (Best, BestVal) = (NIL, -∞)
while Items do §
(Item, Val) = (Head(Items), ValueFunction(Head(Items)))
if Val > BestVal then (Best, BestVal) := (Item, Val)
Items := Rest(Items) ̸§
result is Best ̸§
The closing section block symbol used here () is an approximation of the original symbol, in which the cross stroke is vertical. This is available in Unicode as but does not display correctly on many systems.


Implementations

It is thought that CPL was never fully implemented in the 1960s, existing as a theoretical construct with some research work on partial implementations.
Peter Norvig Peter Norvig (born 14 December 1956) is an American computer scientist and Distinguished Education Fellow at the Stanford Institute for Human-Centered AI. He previously served as a director of research and search quality at Google. Norvig is th ...
has written (for Yapps, a Python
compiler-compiler In computer science, a compiler-compiler or compiler generator is a programming tool that creates a Parsing#Computer_languages, parser, interpreter (computer software), interpreter, or compiler from some form of formal description of a programm ...
) a simple CPL to Python translator for modern machines.


See also

* ''
Fundamental Concepts in Programming Languages ''Fundamental Concepts in Programming Languages'' were an influential set of lecture notes written by Christopher Strachey for the International Summer School in Computer Programming at Copenhagen in August, 1967. It introduced much programming ...
''


References

{{Reflist


Bibliography

* How BCPL evolved from CPL, Martin Richards, 201

* Collected papers of Christopher Strachey, section pertaining to CPL, archived at the Bodleian Library, Oxford
CSAC 71.1.80/C.136-C.184
* D. W. Barron, J. N. Buxton, D. F. Hartley, E. Nixon, and C. Strachey. doi:10.1093/comjnl/6.2.134, "The main features of CPL" ''The Computer Journal'' 6:2:134-143 (1963), availabl
online
* J. Buxton, J. C. Gray, and D. Park
CPL Elementary Programming Manual, Edition II (Cambridge)
(1966). * University of London Institute of Computer Science and The Mathematical Laboratory, Cambridge
CPL Working Papers
(1966). History of computing in the United Kingdom Procedural programming languages Programming languages created in 1963 Structured programming languages University of Cambridge Computer Laboratory