CPL (programming language) facts for kids
Paradigm | Multi-paradigm: procedural, imperative, structured, functional |
---|---|
Designed by | Christopher Strachey et al. |
First appeared | 1963 |
Influenced by | |
ALGOL 60 | |
Influenced | |
BCPL |
CPL, which stands for Combined Programming Language, was an important computer language created in the early 1960s. It's like a grandparent to the very popular C language that many computer programs are built with today. CPL helped shape how computer languages developed over time.
Contents
Designing CPL: A Look Back
CPL was first developed at the University of Cambridge in England. It was initially called the "Cambridge Programming Language." Later, it was also worked on by the University of London Computer Unit. This is why it became known as the "Combined Programming Language." Some people even joked it meant "Cambridge Plus London" or "Christopher's Programming Language," after one of its designers, Christopher Strachey.
Other important people involved in creating CPL included David Barron. The first paper describing CPL was published in 1963. At that time, people were trying to make CPL work on the Titan Computer in Cambridge and the Atlas Computer in London.
What Made CPL Special?
CPL was greatly influenced by another language called ALGOL 60. However, ALGOL 60 was very small and simple, mostly used for scientific math. CPL was designed to do much more! It was meant for a wider range of tasks, not just science.
CPL was a very big and complex language for its time. It aimed to handle things like controlling machines in factories, processing business information, and maybe even some early computer games. The idea was that CPL could be used for both very detailed, low-level programming and for more general, high-level tasks.
Why CPL Didn't Become Popular
Even though CPL was ambitious, it was very hard to make it work. The first full CPL compiler, which translates code into something a computer understands, probably wasn't finished until around 1970. Because it was so difficult to use and implement, CPL never really became popular. It seems to have faded away sometime in the 1970s.
However, CPL had a big impact through its "child" language, BCPL. BCPL stands for "Basic CPL" (or originally "Bootstrap CPL"). BCPL was a much simpler version of CPL. It was mainly used for creating system programs, like the tools that build other computer programs. BCPL was actually created and used in 1967, even before CPL was fully working! BCPL then led to the language B, which then led to the very popular and important C programming language we know today.
How CPL Code Looked
Here is an example of a function called "MAX" written in CPL. A function is a block of code that performs a specific task. This example shows how CPL could find the largest item in a list based on a certain value.
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 special symbol "§" marks the beginning of a block of code, and "§⃒" marks the end.
CPL Today
It is believed that CPL was never fully completed or widely used in the 1960s. It existed more as an idea with some research done on parts of it.
However, a computer scientist named Peter Norvig has created a simple tool. This tool can translate CPL code into Python, which is a modern computer language. This allows people to see how CPL might have worked on today's computers.
See also
- Fundamental Concepts in Programming Languages