Animats
6 days ago
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...
adrian_b
6 days ago
Yes, I completely agree that the real problem of ALGOL-68 has been the complete lack of suitable documentation for it.
Even if Wirth is the author of some important innovations in programming language design, all his programming languages have been significantly inferior to ALGOL-68. Nevertheless, most of them have been more successful precisely because Wirth has written some simple and clear manuals for them, which were easily understood by any programmer.
The formal description used in the report about ALGOL-68 could have been very useful for implementers, but because the language included a lot of novelties it never had any chance of adoption without having, besides a formal description, an extensive tutorial and rationale of the design, accompanied by many programming examples.
This is very sad, because ALGOL-68 got a lot of things right, which are wrong in most later programming languages, but because of its reputation of being incomprehensible it has been very seldom a source of inspiration for the designers of programming languages, as it would have deserved.
Some popular languages, including C, the Bourne shell and C++, have taken various elements from ALGOL 68, but most of them have been superficial elements, like keywords or details of syntax, instead of taking more important elements.
For instance among the ALGOL 68 elements borrowed by C is the keyword "union", but the unions of C are barely better than the EQUIVALENCE of Fortran, and they are not comparable with the unions of ALGOL 68, which were based on the proposal of John McCarthy and which correspond to what are now more frequently called sum types. The "variant records" of Pascal were also much worse designed by Wirth than the unions introduced earlier in the ALGOL 68 that he had criticized.
dfawcus
6 days ago
Actually, I used Algol 68 at uni, while reading EE. That was due to the lecturer tasked with giving us some computing instruction choosing that language. This would have been in around 87 or 88.
I actually quite liked it, finding it easy to translate to / from C and A68, but that was mainly because he only described a subset (incl. nested functions), and didn't even describe REF.
So we got exposed to all of the various FOR/WHILE/DO/OD thing, IF's returning values (used like a C ternary op), etc. Some folks went off and acquired reference books for the language, and explored other areas. I never did as at the time I was comfortable with the K&R C compiler on our dept. unix machines.
The real paint point with A68 there was that the compiler was a batch submission one, took quite some time to run, and the machine doing the work was quite overloaded.
PittleyDunkin
5 days ago
> IF's returning values (used like a C ternary op)
I assume this just refers to a conditional expression?
dfawcus
5 days ago
As I recall, it was something like:
INT x;
x := IF y < 1 THEN 1 ELSE 2 FI;
Possibly one could also place various statements inside the THEN and ELSE sections, as long as they ended with an expression. I've a vague impression about that, but can't properly recall.There was also a short form available, but we were never actually told that, although some folks found it themselves from reference books.
Taniwha
5 days ago
A68 also allowed brackets interchangeably with the key words, you could say:
x := ( y < 1 | 1 | 2 );
habitue
6 days ago
Dude, this is an amazing comment. Really points out how it looks when someone us ahead of their time:
- awkward groping for how to explain things
- none of the words match how we talk about things now
Algol-68 was clearly so ahead of its time, it's hard to understand anything they're saying. They're in outer spaceAnimats
6 days ago
Comes up all the time. Steam engine valve gear is a pulse-width modulation motor driver. Number 5 Crossbar, the best electromechanical telephone switch, is a distributed redundant microservices architecture. Western Union Plan-55A, for switching telegrams, is a mail server and forwarder. Each of those, in its day, was unique in its space, with its own terminology and theory. Today we see them as instances of common patterns.
Right now, large language models are in that state. They work, but why they work and why they fail is barely understood. As more systems are developed in that space and adjacent to it, more general understanding may emerge.
mpweiher
6 days ago
- awkward groping for how to explain things
- none of the words match how we talk about things now
My life in a nutshell these last few years.Glad to hear it might not be utter incompetence.
user
6 days ago
twoodfin
6 days ago
I’d love to find [3] as a PDF!
adrian_b
6 days ago
I assume that it has about the same content as the book "Informal introduction to algol 68", published by the same authors a few years later, and which had at least two editions, e.g. in 1973 and in 1977.
Searching the Internet finds some scanned copies of that book.
E.g.
https://www.softwarepreservation.org/projects/ALGOL/book/Lin...