Ask HN: Does anybody else like the syntax of Algol 60?
3 comments
Algol, and its formal EBNF description, is definitely the easiest language I have ever worked with. Burroughs, now Unisys, had an immensely powerful combination of true stack based hardware, a compact OS that supported parallel running across systems as well as programs, and various tailored flavours of Algol for comms, database and other use. A great development environment, decades ahead of its time. Alas C and Unix were cheaper and Burroughs never really understood that there was a market other than big tin users.
But yes, even now when I write Ruby or Python or Go, I miss the clarity of Algol.
But yes, even now when I write Ruby or Python or Go, I miss the clarity of Algol.
Algol 60 lives on via Lisp.
If you want to use it, Algol 60 an option with Dr. Racket: http://docs.racket-lang.org/algol60/
If you can tolerate a later version, there's Algol 68 Genie: http://jmvdveer.home.xs4all.nl/algol.html
If you want to use it, Algol 60 an option with Dr. Racket: http://docs.racket-lang.org/algol60/
If you can tolerate a later version, there's Algol 68 Genie: http://jmvdveer.home.xs4all.nl/algol.html
I wasn't aware of Dr. Racket supporting it. Thanks for the link!
s/like/know/
Algol perhaps had the disadvantage of being far more popular among academics than among actual programmers. Perhaps for that reason Algol became the lingua franca of pseudocode, while C became the lingua franca of actual code.
(I don't know if this is fair, but I've always had the impression that Algol was a bit like Ada in its time: respected by those who used it, but a bit too kitchen-sink to be popular among implementors.)
Algol perhaps had the disadvantage of being far more popular among academics than among actual programmers. Perhaps for that reason Algol became the lingua franca of pseudocode, while C became the lingua franca of actual code.
(I don't know if this is fair, but I've always had the impression that Algol was a bit like Ada in its time: respected by those who used it, but a bit too kitchen-sink to be popular among implementors.)
When you look closely, C is a very academic programming language, and its academic influence can be seen in its design-level decisions.
For instance, why does C differentiate between for loops and while loops? Because mathematically there's a natural partition between the two: for loops correspond to primitive recursion, and while loops correspond to total recursion.
Here's another one: why are unions called unions? Because, if types are interpreted as sets, the C union is directly equivalent to the set theoretic union. Similarly, structures are directly equivalent to the Cartesian product (although they are not named appropriately).
K&R were geniuses, not only in practical programming, but in the egg-head understanding of the mathematical theory behind programming languages.
For instance, why does C differentiate between for loops and while loops? Because mathematically there's a natural partition between the two: for loops correspond to primitive recursion, and while loops correspond to total recursion.
Here's another one: why are unions called unions? Because, if types are interpreted as sets, the C union is directly equivalent to the set theoretic union. Similarly, structures are directly equivalent to the Cartesian product (although they are not named appropriately).
K&R were geniuses, not only in practical programming, but in the egg-head understanding of the mathematical theory behind programming languages.
Algol was the first programming language I learned in college. I also used Ada professionally for years. I believe that Ada is not at all like Algol, even though Ada was nominally based on the Algol family of languages (including Pascal). I think of Ada as a monster of a language, more like PL/I than Algol, and very difficult to learn in its entirety. Algol is an elegant language, and I think you can learn enough of it to make use of its power in a fraction of the time you'd spend getting proficient with Ada.
To be clear, I was talking more about how it was perceived at the time, not about how it actually was. (And of course, what was kitchen-sink-worthy in 1960 would be seen as ultracompact today.) But in any case, I bow to someone with actual experience.
It also helps that most textbooks, when they need to describe an algorithm, use an Algol 60 kind of syntax as opposed to a C kind of syntax.