Algol 60

ALGOL, the abbreviation of Algorithmic Language (ALGOrithmic Language), is the first high-level programming language family in the history of computer development. It was still an era when transistor computers were popular. Because ALGOL statements were close to ordinary language expressions and more suitable for numerical calculations, ALGOL was mostly used in scientific computers.

ALGOL 60 refers to the ALGOrithmic Language that came out in 1960. This programming language influenced subsequent CPL, BCPL, B language, Pascal, Simula, and C language, and had a strong influence on the field of programming. This year, this ancient language is 60 years old. The British technology media The Register recently visited the British National Computing Museum and took us to review the development story of this language.

Elliott 803 computer at Loughborough Grammar School, 1976

Sixty years ago, ALGOL 60 laid the foundation for many computer languages.

In that era of computers that relied on punched paper tape, what value did the ALGOL 60 play? Peter Onion and Andrew Herbert from the National Museum of Computing take us back to the story of that era.

ALGOL 60 is the successor to the ALGOL 58 language (ALGOL 58 was introduced in 1958). ALGOL 58 introduced the concept of code blocks (and used begin and end pairs to separate them), and ALGOL 60 really began to use structured programming and carried it forward. Later, Pascal and C, as well as B and Simula, etc. all adopted similar designs. .

"In the 1950s, most code was originally written in machine code or assembly code." Andrew Herbert, former president of Microsoft Research Cambridge, said that each computer has its own unique code characteristics. One of the first generation languages, called Autocode, was designed for coding problems such as equations, and code written in that language was then translated into machine code. But unlike today's languages, the language didn't have a lot of bells and whistles. To make matters worse, some Autocode languages have features that other Autocode languages don't, making it difficult for developers to move from one system to another.

Onion said: "There is an Autocode for the Elliott 803, but it only supports expressions like A + B = C, so if your equation is complex, you have to break it up into different individual binary operations. So programmers at that time still had to do a lot of hard work."

"Fortran was the first programming language that was really useful for scientific and numerical work," Herbert said. This led to the belief that using high-level languages (as they were called back then, even though they were primitive by today's standards) Can improve programmer productivity.

However, since these languages required additional costs in compilation and the compilers themselves were inefficient at the time, machine code still had the upper hand in terms of performance. However, for scientific research work, performance is not the highest requirement; it would be great if you can solve the problem by just typing some code and then delve into the next problem.

Herbert continued: "Fortran was more like Autocode. It still is to some extent! And many people think it can do better."

A team at the International Federation for Information Processing (IFIP) began designing ALGOL, later known as the Algorithmic Language, a language for writing algorithms. Their result was released in 1958 as ALGOL 58. But as engineers began to create compilers for the new system, they discovered that "everything hadn't really been thought through and studied thoroughly," Herbert said.

Hence various revisions and revisions. A bulletin called "The ALGOL Bulletin" details this arduous journey and the problems and shortcomings they solved or tried to solve.

Unlike today's open source mailing lists, the process was conducted on paper.

Finally, they released the "ALGOL 60 Report", which became the basis for everyone's further development.

These IFIP committees were under a lot of pressure at the time and were suffering from the differing approaches of each country. The Americans have a lot of experience with Fortran and hope that the results can be quickly applied on their computers; while the Europeans are more sensible, Herbert said with a smile, "They also considered the beauty and elegance of the language."

"People were coming up with new ideas that we now take for granted, like structured programming," he added.

The language is popular with vendors because programmers can more easily port systems and code across generations of hardware devices without having to rewrite various programs each time a computer is updated. "
ALGOL 60 written on punched paper tape

However, ALGOL 60 cannot be used to simply write the "HELLO WORLD" program example. This language had a fatal flaw: the lack of standard input/output functions. This shortcoming inspired many subsequent language innovations.

"The committee couldn't agree on the input/output side," Herbert said. "They ultimately decided to leave it to the software library, which is up to the user."

Onion added: "Here, the user is the compiler author."

Then there's no way. This missing part can only be solved by the suppliers themselves, and manufacturers naturally prefer their own solutions, so in the end the codes between many different systems are incompatible. ALGOL 60 also has some elements that are not specifically defined, so there is a certain amount of compromise from the start.

After ALGOL was introduced, development of Fortran continued. Herbert said: "People in the Fortran world saw that there were ideas they liked in ALGOL, so they directly transplanted it." Decades later, Fortran is still at the center of scientific computing, while ALGOL tends to be more of an academic language. , ideas for teaching computer science. "

"ALGOL is widely used in the scientific research community and is supported by most mainframe manufacturers," Herbert said.

Some of the teams behind ALGOL 60 continued development and later released ALGOL 68. As Herbert said, ALGOL 68 resolves the ambiguities in ALGOL 60.

In fact, in computer science courses in the 1970s, the language was largely inescapable.

Herbert laughed: "It has the most bizarre input/output system in the world."

But for those who loved the language, it's unfortunate that it has come to an end. Although ALGOL 68-R was widely used in military applications for some time (especially in the UK), it was not until the 1970s that a fully implemented version of ALGOL 68 appeared.

The final version of "The ALGOL Bulletin" was published in 1988, in which the editor wrote: "ALGOL 68 is a very stable language. People who understand its benefits and advantages still use and love it, while others ignore it (or misunderstood) it.”

The story of ALGOL 60 itself is not the final fate of the language; it inspired many other languages. Niklaus Wirth and QuickSort creator Tony Hoare developed ALGOL W based on the ALGOL X proposal, which later spawned Wirth's Pascal and Modula-2. And Pascal's influence continues to this day.

ALGOL 60 also greatly influenced the Combined Programming Language (CPL) developed in the 1960s, but this language was not implemented until the next decade. Later, CPL gave birth to Basic CPL (BCPL), which in turn brought the B language. The B language was later further developed into the C language.

Tony Hoare was responsible for developing an implementation of ALGOL 60 on the Elliott 803 computer. This example can still be run on a machine at the National Museum of Computing in the UK, but the way programs are compiled and run on this hardware is not the same as the development environment familiar to programmers today. There is a difference.

First, the compiler must load the program using punched paper tape. The ALGOL program itself is then fed into the tape reader. "The process is somewhat arbitrary, and compilation can take anywhere from 30 seconds to 15-20 minutes," Onion said.

Video: https://www.youtube.com/watch?v=AIxZ1i8pvZI

After compilation is complete, the program can start using the space previously occupied by the compiler. However, it is not pleasant to do this kind of thing, because the next user will have to reload the compiler. Keeping it in memory means multiple programs can run.

"This is popular in teaching because you can line up students to use punched tape with their programs written on them," Herbert said. "You just go to the machine, load up the ALGOL system, run your program, get some data, Then you can walk away and think about the results while the next student runs their own program."

In an era when paper tape is king, Onion believes that learning programming can also improve concentration skills. "When the cycle of edit, compile, edit, compile can last more than 10 minutes, you have to pay close attention to your source code..."

The National Museum of Computing in the UK has two Elliott computers in its collection, an 803B from 1962 that was donated after sitting unused in a barn for 15 years, and a 903. Both computers are fully functional and you can see them running during your visit to the museum.

The 803B, maintained by Onion, also had a Calcomp drum plotter and some additional input/output capabilities.