CPL (programming language)

CPL
Paradigm

multi-paradigm:

procedural, imperative, structured, functional
Designed by Christopher Strachey et al.
First appeared 1963 (1963)
Influenced by
ALGOL 60
Influenced
BCPL, POP-2

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

Design

Combined Programming Language (CPL)[1] 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".[2] The collaborative effort was responsible for the "Combined" in the name of the language (previously, the name was Cambridge Programming Language). Christopher Strachey and David Barron were involved (for others see paper). In 1963 (when the paper was published) it was concurrently 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, 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,[3] but the language never gained much popularity and seems to have disappeared without trace sometime in the 1970s.

BCPL (for "Basic CPL", although originally "Bootstrap CPL"), was a much simpler language based on CPL intended primarily as a systems programming language, particularly for writing compilers; 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.

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 §⃒

(The closing symbol to match the opening symbol "§" is a "§" with a vertical stroke through it. That symbol can be composed in Unicode as "§⃒", which is § (U+00A7, SECTION SIGN) composed with ⃒ (U+20D2, COMBINING LONG VERTICAL LINE OVERLAY), but it may not display correctly on your browser.)

See also

References

  1. ["The main features of CPL" (PDF). comjnl.oxfordjournals.org. Retrieved 2015-08-27.]
  2. "Clive Feather on CPL and BCPL". Lysator.liu.se. Retrieved 2013-08-18.
  3. 1 2 Peter Norvig. "Prescient but Not Perfect: A Look Back at a 1966 Scientific American Article on Systems Analysis". Blogs.scientificamerican.com. Retrieved 2013-08-18.

Bibliography

This article is issued from Wikipedia - version of the Thursday, August 27, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.