November 8th, 2024

Algol-68 seemed like a good idea – until it wasn't

Algol-68, developed in the 1960s as an extension of Algol-60, became overly complex, faced criticism, struggled for industry support, and ultimately failed to achieve broader success despite niche applications.

Read original articleLink Icon
Algol-68 seemed like a good idea – until it wasn't

Algol-68 was developed in the 1960s as an extension of Algol-60, aiming to create a more universal programming language. Despite its ambitious goals, it became overly complex and difficult to implement, leading to criticism from notable figures like C.A.R. Hoare and Niklaus Wirth. The language was intended for academic programmers but failed to gain traction in the industry, partly due to its complicated design and lack of support from major companies like IBM. Although the first compiler appeared in 1970, it was based on a simplified subset of Algol-68, which limited its adoption. The language's academic roots and the involvement of a large committee contributed to its downfall, as it struggled to balance theoretical ideals with practical usability. While Algol-68 found some use in the USSR, particularly in designing telephone exchanges, it ultimately did not succeed as a commercial or teaching language. The experience with Algol-68 highlighted the challenges of programming language design, emphasizing the need for simplicity and practicality over complexity.

- Algol-68 aimed to be a universal programming language but became overly complex.

- Criticism from prominent figures like Hoare and Wirth highlighted its design flaws.

- The language struggled to gain industry support and was not widely adopted.

- Its academic focus limited its practical usability and teaching effectiveness.

- Algol-68 found some niche applications in the USSR but failed to achieve broader success.

Link Icon 12 comments
By @Animats - 6 months
It's not that ALGOL-68 was that bad. It's that the description of it was terrible. There was an attempt to formalize the semantics, and it was a disaster. Nobody knew how to describe language semantics back then, so they invented a new notation. There was an ALGOL-68 report, which was incomprehensible.[1] Then there was "Informal Introduction to ALGOL-68"[2], which was difficult. Finally, there was a "Very Informal Introduction to ALGOL-68"[3], which was somewhat readable.

Some sample text from the report:

A "nest" is a 'NEST'. The nest "of" a construct is the "NEST" enveloped by the original of that construct, but not by any 'defining LAYER' contained in that original. (The nest of a construct carries a record of all the declarations forming the environment in which that construct is to be interpreted. Those constructs which are contained in a range R, but not in any smaller range contained within R, may be said to comprise a "reach". All constructs in a given reach have the same nest, which is that of the immediately surrounding reach with the addition of one extra "LAYER". The syntax ensures (3.2.1.b, 3.4.1.i,j,k, 3.5.1.e, 5.4.1.1.b) that each 'PROP' (4.8.1.E) or "property" in the extra 'LAYER' is matched by a defining. indicator (4.8.1.a) contained in a definition in that reach.)

They're trying to get hold of the concept of variable scope and lifetime, back when that was a new idea.

They were also trying to invent type theory, which they needed and which didn't exist yet. The first 50 pages of the report are all about the notation they invented to be used in the rest of the report. It's not a very good notation. It's like calculus before Leibniz, when people were trying to use Newton's fluxions.[4] Computer science just didn't have enough widely understood abstractions for people to even talk about this stuff clearly.

[1] https://www.softwarepreservation.org/projects/ALGOL/report/A...

[2] https://www.abebooks.com/servlet/BookDetailsPL?bi=3196204463...

[3] https://www.computinghistory.org.uk/det/8776/A-Very-Informal...

[4] https://en.wikipedia.org/wiki/Fluxion

By @ogogmad - 6 months
I've just looked at this snippet, which the blog used back in 2017 to illustrate that Algol 68 was "utter madness": https://craftofcoding.wordpress.com/2017/03/06/a-brief-look-...

   COMMENT
   Algol 68 program to calculate the Sieve of Eratosthenes
   for some upper limit N
   COMMENT

   PROC eratosthenes = (INT n) []INT:
   (
       [n]INT sieve;

       FOR i TO UPB sieve DO
           sieve[i] := i
       OD;
       INT k = ENTIER sqrt(n);
       sieve[1] := 0;
       FOR i FROM 2 TO k DO
           IF sieve[i] NE 0 THEN
               FOR j FROM i*i BY i TO n DO
                   sieve[j] := 0
               OD
           FI
       OD;
       sieve
   );

   INT n;
   print("Upper limit to calculate sieve? ");
   read(n);
   print((eratosthenes(n), newline))

A few things: This code is very readable. The blogger didn't understand it because he didn't understand what the "Sieve of Eratosthenes" did: It's a means of calculating lists of prime numbers. He incorrectly stated that it was used for calculating Fibonacci numbers.

Syntax-wise, it looks like some mix of Go, C and Python. Nothing at all unusual. It would be pretty easy to learn to program in this, and comfortable too.

[Edit: The blogger later demonstrated a good understanding of the Sieve of Eratosthenes, but still expressed criticism of Algol68: https://craftofcoding.wordpress.com/2021/04/06/algorithm-35-...]

By @mhd - 6 months
There's a lot of hearsay in that articles, and a lot of sentiment rooted in the particulars of that time.

Sure, it was a complex thing in the late 60s/early 70s. Sure, Wirth came up with something simpler. But I'm missing a deeper analysis, especially with a more modern view point where basically any language is at least as complex as Algol 68[0].

> Arguably Wirth’s Algol-W was a better successor to Algol-60

I might not even disagree, but what were the arguments, and how are they holding up?

> and arguably did not have the same connections to industry as the likes of Fortran and Cobol

Sure. But neither did Algol-W or Pascal. And pretty much anything else in the 20th century.

[0]: http://cowlark.com/2009-11-15-go/

By @trhway - 6 months
>Algol-68 (or derivatives of) did rise to some prominence in one place – the USSR. The most prominent implementation of the language came from Leningrad State University. It was apparently used to design Russian telephone exchanges.

6-pass compiler for Algol-68 :) The telephone exchange was built on the base of the microcomputer (while developed in USSR/Russia, and ultimately that microcomputer was mostly used by the Russian military, the major customer for the exchange who funded the work at some point was Alcatel) which was like Tandem, only 3 instead of 2 systems in parallel because of low quality of electronics, the CPU was USSR-developed "Samson" [1], a kind of Elbrus offshoot. The exchange software was developed in SDL (Z.100, kind of like Erlang-by-European-commitee-in-1980ies) and compiled into Algol-68 which was compiled into that CPU codes.

[1] (in Russian) https://www.computer-museum.ru/articles/sistemi_kompleksi/90...

By @foldr - 6 months
I did some of the Advent of Code in Algol 68 a few years back: https://github.com/addrummond/aoc_2021_algol68

It was a surprisingly pleasant language to work with considering its age. The main annoyances were:

* Extensible arrays were fiddly to work with (which is understandable given that allocating arrays of arbitrary size barely makes sense on a 1968 computer).

* Formatted IO is weird. I never really understood how it worked and just tweaked examples till I got what I needed.

* No hashtables in the stdlib.

* Available implementations on modern hardware are not production quality.

By @jandrese - 6 months
It sounds like a classic case of the Second System effect. Where the original product was functional but a maybe little too basic, so everybody has an idea of how to improve it. Many of the ideas are good on their own, but the committee ends up accepting far too many and the thing suffers from terminal feature creep.
By @somat - 6 months
Algol-68 is sort of the reference case for the problem with prescriptive standards.

They sound like a good idea "Lets get the best minds together and create the ideal standard" however because they are not based on anything built tend to be over engineered and hard to implement.

At the opposite end of the spectrum is posix, which is a sort of terrible "lets just glob what everyone is doing together" descriptive standard, at least it gets everyone operating on the same page. so I think of it as a good place to start, not the end result.

There is a reason the ieft was so successful with their "working code and rough consensuses". Which is why it worries me as they try to redefine them self as a "standards" body. as opposed to publishing standards.

By @pjmlp - 6 months
Industry did adopt ALGOL variants, it was and still is, one of the languages on the Burroughs linage.

https://public.support.unisys.com/framework/publicterms.aspx...

UK Navy also had a system programmed on it.

Also it was largely influential in PL/I and its dialects, which were used a bit everywhere, the most well known being PL.8, PL/S and PL/M.

And the competition that eventually lead to the Pascal tree of programming languages.

History would have been much different if Algol 68 hadn't existed in first place.

By @butterisgood - 6 months
And we lost Wirth this year sadly. I hope we can find a language with safety, simplicity, and just enough features to be practical someday.
By @pram - 6 months
The development and scope creep sounds a lot like what happened with Perl 6 ;P
By @zgs - 6 months
Algol 68 was to Algol as C++ is to C: trying to do too much resulting in over-complexity.

The two page spread showing a graph of the implicit type conversions was a masterpiece.

By @Koshkin - 6 months
Algol 68 ended up competing with Ada, and you can guess which one won.