21 Algol 60 Compilers in 1962
shape-of-code.com
shape-of-code.com
https://www.masswerk.at/algol60/report.htm
Call by name in particular can be very tricky, especially where it intersects with higher-order functions.
It can also be interesting to read contemporary discussions of problematic spots in the language, e.g.:
https://dl.acm.org/doi/10.1145/366193.366209
https://dl.acm.org/doi/10.1145/363717.363743
And the original ALGOL bulletin which has committee reports and mailing lists for the design process:
https://archive.computerhistory.org/resources/text/algol/alg...
Turbo Pascal is just an example from the days when C and C++ were yet to rule the Zeitgeist, and we had scripting all over the place.
Coming to think of it, my 486 from early 90s when running DOS was one of the fastest computers I have used when it comes to bootup and applicaion load times. I was like type name of program, press enter and the program is up and ready to use. The systems that I had before that did take a lot longer to launch programs and anything with Windows has always felt an order of a magnitude slower. Modern tiny linux disros can match that speed, but then that is only with a very slimmed down system minus any gui. The MacBook Pro with M1 Pro did feel a lot faster than previous macs or windows machines when it came to application launch times and general gui responsiveness, but still no match to those DOS systems.
Most likely a consequence of how many compiler writers care about optimizations in FPC codebase.
I think there's also the effect that old, polished software can tend to become increasingly optimized.
Or the development workflow in Haskell and OCaml is much better than Rust, despite having a rather complex type system, because those ecosystems have invested into having interpreted toolchains, also able to load compiled code.
Rust and C++ are at this weird intersection of features where, on one hand, they need to have very fancy optimizers to remove all the overhead that idiomatic high-level library code (including stdlib) has, and on the other, they have generics and some degree of type inference that results in lots of generated code that consequently needs to go through the optimizer.
You can argue that it is that intersection that it itself problematic. But then again, C++ is arguably so popular precisely because it offers it, and Rust became popular because it was the first thing other than C++ that targeted the same broad niche.
Using C++23 modules (import std) is quite fast, even more so with binary libraries, or the proprietary C++ Builder packages, and has been proven that the reason Rust is slow is the amount of unoptimized IR code the frontend shoves down into LLVM backend, and not the type system.
What I argue is the lack of investment in compiler tooling, once upon a time IBM and Lucid, showed the world how to have a Smalltalk/Lisp Machine like experience with C++ for example.
Besides "call by name", also using gotos for dynamic non-local exits, even by passing labels as an argument to a procedure, is pretty tricky.
Not really working in the area and did not research now, but I can come up with:
* gcc
* clang
* Microsoft probably has their own implementation
* Intel probably still has their own implementation
* ?
Edit: OpenVMS maybe, but not sure whether that qualifies for in wider use
Edit2: ARM of course
Back in 2021, Intel moved the back end of their compiler toolchain to LLVM . Intel still has their own proprietary front end (icpx).
https://www.google.com/search?q=intel+compiler+llvm+adoption
https://www.intel.com/content/www/us/en/developer/articles/g...
EDG used to be the gold standard of ISO conformance.
In the x86-64 port, they've been moving OpenVMS to use LLVM too. With the VAX->Alpha port, DEC introduced a common backend for all their OpenVMS compilers, called "GEM". For the Alpha->Itanium port, Compaq/HP kept the GEM backend but modified it to generate Itanium code instead of Alpha.
For the x86-64 port, instead of investing in modifying "GEM" to support x86-64, VSI decided to use LLVM as a backend, and then write a translator from GEM's intermediate representation to LLVM's. So they keep the same frontends as before – except for C++, where they replaced the EDG/Intel frontend with LLVM – but now use LLVM as a backend. https://llvm.org/devmtg/2017-10/slides/Reagan-Porting%20Open...
OpenVMS has a somewhat unusual ABI. For x86-64 they've tried to make it more consistent with the standard Linux x86-64 ABI, but there remain some distinctive features. One feature (which I actually really like, I think it is a shame that other ABIs don't do this), is that variadic function calls pass the argument count in a register (%rax on x86-64). Another is that all functions must have a 32-bit address; the code of a function can be allocated above 4GB, but they allocate a trampoline under 4GB which jumps to its actual code – this was done to simplify interoperability between 32-bit and 64-bit code in the same address space. https://docs.vmssoftware.com/vsi-openvms-calling-standard
IBM still has their classic XL C/C++ compilers for AIX, IBM i and mainframe, but they've been converging to LLVM. I believe the pre-LLVM versions share a common backend with some of their other language compilers (COBOL, PL/I, PL/X, PL.8, etc), ultimately going back to work of their Toronto and Yorktown labs starting in the 1980s. More recently they've started replacing their C/C++ frontends with LLVMs, while keeping their own backend; and even more recently swapping out their backend for LLVM's too.
(one could argue that MSVC is slowly becoming a niche compiler too - it feels like it's not as important anymore as it was 10..15 years ago, maybe because a lot of new C/C++ programmers seem to start on Linux, not Windows - that's at least the 'general vibe' I'm getting)
While Microsoft has embraced clang as well, including on XBox, I am certain it does not consume all Windows SDKs, not yet.
[1] https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace...
I'm not sure what the current plan is for C compilation after the LLVM divorce and after Clang will be moved into a Zig package (e.g. I remember talk that arocc [1] is going to be integrated into the Zig compiler, but not sure if that's still planned, or if C compilation will also be delegated to the new Clang package along with C++ and ObjC compilation).
I’m not sure how many independent compiler backends are widely used with those frontends and stdlibs.
I wonder why the retrocomputing crowd hasn't done much in ALGOL. Perhaps because it's just easier to write in BASIC, which was influenced by it.
OTOH if you disregard those, the rest is simple to understand because there isn't much of it. E.g. there's a grand total of three types: integer, real, and Boolean. There are no structs, pointers, or really any derived types (it has arrays, but they aren't technically types but rather an orthogonal property of variables).
But, for the same reason, it's not particularly useful. The lack of pointers especially limits what you can do with it, even if you use it for its original primary purpose (reference implementations of algorithms).
When I was a kid, the systems that we cared about were 8 bit home systems, starting with anything CP/M, and then there was the whole big machines being used at universities and our parents jobs, which we only knew from computer magazines.
Also the RAE institution for the Spanish Language does something similar to SRFI's + RSR?s for Scheme.
BASIC didn't have to be a bad choice either, Acorn/BBC BASIC even had proper inline assembly.
The twitching corpse lived on in the form of JOVIAL for DOD work (until ADA happened), and CORAL persisted in the UK because of bureaucratic momentum. Simula was another derivative that lasted for a while.
But C and PASCAL were better, simpler, equally productive languages. As soon as they appeared ALGOL 60 didn't really need to exist any more. And ALGOL 68 was an ALGOL too far.
Algol 68 doesn't really have anything in common with Algol 60 apart from name. The syntax is completely different, as is the overall feel of the language.
It surprised me because people talk about COBOL and Fortran being dead, but ALGOL always seemed really dead, and I couldn't believe that there was still ALGOL running this century.
Imperative languages only have a handful of concepts, like variables, type declaration, looping, branching, function call, etc. and the language and the context generally make those pretty easy to identify.
The other language types (functional, forth-like, etc.) have similar (but often different) concepts, and once you understand the concept and can see it through the syntax, it's pretty easy to follow along.
Writing new code in a new language is the difficult part.
Formal Syntax: ALGOL 60 used Backus-Naur Form (BNF) to formally define its syntax, setting a standard for future language specifications.
Recursion: It supported recursive function calls, which was revolutionary at the time.
Lexical Scoping: It allowed nested functions and controlled variable scope.
Platform Independence: It aimed to be machine-independent, making it suitable for documenting algorithms.
[1] http://www.math.bas.bg/bantchev/place/algol68/a68rr.html