Jump to content

CPL (programming language)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 199.64.72.252 (talk) at 13:57, 15 May 2012 (remove reference spam). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

CPL
Paradigmmulti-paradigm: procedural, imperative, structured, functional
Designed byChristopher Strachey et al.
First appeared1963
Influenced by
ALGOL 60
Influenced
BCPL, POP-2

CPL (from Combined Programming Language and Cambridge Programming Language before that) was a multi-paradigm programming language, that was developed in the early 1960s.

Design

CPL was developed jointly between the Mathematical Laboratory at the University of Cambridge and the University of London Computer Unit during the 1960s hence CPL gained the nickname "Cambridge Plus London".[1] The collaborative effort was responsible for the "Combined" in the name of the language (previously, the name was Cambridge Programming Language). D. W. Barron and Christopher Strachey were involved (for others see paper). In 1963 (when the paper was published) it was currently being implemented on the Titan Computer at Cambridge and the Atlas Computer at London.

It was heavily influenced by ALGOL 60, 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 and business data processing, among other things. CPL was also 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,[2] but the language never gained much popularity and seems to have disappeared without trace sometime in the 1970s.

A later language based on CPL, called BCPL (for Basic CPL, although originally Bootstrap CPL), was a much simpler language intended primarily as a systems programming language, particularly for writing compilers. BCPL then led, via B, to the popular and influential C programming language.

Example

The function MAX as formulated by Peter Norvig[3]:

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 §

References

  1. ^ "Clive Feather on CPL and BCPL".
  2. ^ Peter Norvig. "Prescient but Not Perfect: A Look Back at a 1966 Scientific American Article on Systems Analysis".
  3. ^ Peter Norvig. "Prescient but Not Perfect: A Look Back at a 1966 Scientific American Article on Systems Analysis".

Bibliography

  • 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. "The main features of CPL" The Computer Journal 6:2:134-143 (1963).