This article is more than 1 year old
ALGOL 60 at 60: The greatest computer language you've never used and grandaddy of the programming family tree
Back to the time when tape was king
2020 marks 60 years since ALGOL 60 laid the groundwork for a multitude of computer languages.
The Register spoke to The National Museum of Computing's Peter Onion and Andrew Herbert to learn a bit more about the good old days of punch tapes.
ALGOL 60 was the successor to ALGOL 58, which debuted in 1958. ALGOL 58 had introduced the concept of code blocks (replete with begin
and end
delimiting pairs), but ALGOL 60 took these starting points of structured programming and ran with them, giving rise to familiar faces such as Pascal and C, as well as the likes of B and Simula.
"In the 1950s most code was originally written in machine code or assembly code," said Herbert, former director of Microsoft Research in Cambridge, with every computer having its own particular twist on things. A first generation of languages, called "Autocode", existed for coding problems like equations which could then be translated into machine code, but lacked the bells and whistles of today. Worse, some had features that others lacked, making hopping between systems tricky.
"There was an Autocode for the [Elliott] 803," said Onion, "but it only supported expressions like A + B = C, so if you've got a complex equation, you have to break it down into individual single binary operations. So there was still a lot of hard work to be done by the programmer."
"Fortran," said Herbert, "emerged as the first real programming language for scientific and numeric work. That convinced people that having higher-level languages (as they called them then – they were pretty primitive by modern standards) made programmers more productive."
The overhead of compiling, and inefficiencies in the compilers themselves, meant that machine code remained king of the performance hill, but for those doing science work, the ability to churn out some code to solve a problem and then simply move on to the next was appealing.
"Fortran," Herbert continued, "was more like an autocode," before laughing, "It still is in some ways!
"And a bunch of people thought you could do better."
Enter the International Federation for Information Processing (IFIP), which Herbert recalled "had a whole bunch of committees who looked at standards and problems in computing".
One group started on the design of what was then called an "Algorithmic Language": a language for writing algorithms. The output, in 1958, described the language "ALGOL 58". However, as engineers began to create compilers for the new system, they found "all kinds of things hadn't really been thought about or worked through properly," recalled Herbert.
And so there were revisions and changes. A periodical called "The ALGOL Bulletin" detailed the travails of those involved as the problems and the weaknesses in the language were dealt with (or at least attempted).
The process was not unlike an open-source mailing list today, but in paper form.
Eventually, Herbert told us, "they published the ALGOL 60 report, which is the baseline that everyone then worked to."
The committees were under pressure and also suffered a little from differing international approaches. The American side had a lot of experience in Fortran and were seeking something that could quickly be made to work on their computers, while the Europeans were a little more cerebral and had, Herbert laughed, "terrible notions like beauty and elegance in mind for the language".
"People were sorting out some of the things that we now take for granted like ideas in structured programming, data structures, data types," he added.
Seeking solutions to the problem of portability of programmers between systems and code between hardware generations as well as avoiding the pain of having to rewrite programs every time a new iteration of computer arrived, vendors embraced the language with variants cropping up over many manufacturers.
ALGOL 60 on tape (pic: Peter Onion)
Alas, those seeking a handy-dandy "HELLO WORLD" example will be disappointed. The Achilles' heel of the language that would go on to inspire so many others was that it lacked standard input/output capabilities.
"The defining committee couldn't agree on how to do input/output," said Herbert. "They decided that would be left to a library, and that library would be user dependent."
"In this case," added Onion, "the user being the compiler writer."
Oh dear. The omission pretty much did for vendor independence as manufacturers naturally went their own way, leaving large chunks of code incompatible between systems. There were also elements of ALGOL 60 that were open to interpretation, leaving it a little compromised from the start.
While ALGOL ploughed its furrow, Fortran continued to be developed in parallel. "People in the Fortran world," explained Herbert, "saw ideas in ALGOL they quite liked and brought them across." As the decades passed, Fortran remained the centre of gravity for scientific computing while ALGOL became more of an academic language, used for teaching computer science ideas.
"It was quite heavily used in the scientific community," Herbert said. "Most mainframe manufacturers supported it."
Some of the team behind ALGOL 60 stayed with the project and went on to come up with ALGOL 68, which, as far as Herbert is concerned, "nailed all the things that ALGOL 60 had left a bit vague".
Indeed, it was hard to avoid in the 1970s for those taking computer science courses. This hack has fond memories of the successor language, while the grandfather of Reg sub-editor Richard Currie had a hand in the development of ALGOL 68-R and RS.
"It had the world's most exotic input output system," Herbert laughed.
It was also, sadly for its enthusiasts, a bit of a dead end. Despite ALGOL 68-R becoming widely used in (particularly British) military applications for a time, it would take until the 1970s for a full implementation of ALGOL 68 to become available.
The last edition of The ALGOL Bulletin was published in 1988, with its editor noting: "ALGOL 68 as a language is very stable. It is used and loved by those who understand its benefits, and ignored (or misquoted) by the rest."
The story of ALGOL 60 is not so much of the language's eventual fate, but also of those that it inspired. ALGOL W, based on a proposal for ALGOL X, by Niklaus Wirth and QuickSort creator Tony Hoare would go on to inspire Wirth's Pascal and Modula-2. Pascal's influence continues to be felt today.
ALGOL 60 also heavily influenced the Combined Programming Language (CPL), developed in the 1960s but not implemented until the following decade. CPL in turn led to Basic CPL (BCPL), from which B descended. The B language was further developed to become C.
Tony Hoare was responsible for the implementation of ALGOL 60 on the Elliott 803 computer, an example of which remains operational at The National Museum of Computing, although compiling and running a program on that hardware is a little different to the development environments to which coders are now accustomed.
First, the compiler must be loaded from paper tape. The ALGOL program itself is then fed into the tape reader and "it sort of chunters away," remarked Onion, "for anything between 30 seconds to perhaps 15 or 20 minutes during the compilation."
Once compiled, a program would be free to use the space originally occupied by the compiler. Doing so would, however, not win the programmer any popularity awards since the next user would have to reload the compiler again. Leaving it in memory meant that multiple programs could be run.
"That made it very popular for teaching," said Herbert, "because you can have a line of students, each with their paper tape with their programme in their hand and you basically march up to the machine, the machine's got the ALGOL system loaded, you run your programme, it produces gibberish, you go away and think about it and the next student runs their programme."
With paper tape being king, Onion observed that the experience of programming taught a bit of focus: "When your edit, compile, edit, compile cycle starts to get above about 10 minutes, you start to pay an awful lot of attention to your source code…"
The National Museum of Computing has two Elliott machines in its collection, a 1962 803B (which was donated after spending 15 years lurking in a barn following its decommissioning) and a 903. Both are fully operational and can be seen running once the museum is able to open its doors once again.
The 803B, which is maintained by Onion, also features a Calcomp drum plotter as well as some additional input/output features.
The Lorenz attractor plotted by an ALGOL program (pic: Peter Onion)
As for taking the ALGOL 60 itself out for a spin today, there are a few options for those not fortunate enough to have an Elliott 803 or 903 to hand. MARST will translate ALGOL 60 to C or one can get a feel for the whole 803 experience via a simulator.
Although as ALGOL 60 turns 60, you could just fire up a modern programming language. Lurking within will likely be the ideas of ALGOL's designers. ®