On Sun, 8 May 2005, Allison wrote:
You're
confusing the lack of a hardware stack with the lack of local
variables. They are not at all related.
Correct. But a stack makes some forms of programming easier.
Eh. What's easy got to do with it? :-)
For that
matter, Algol had local variables long before C was invented,
and as you pointed out, there's an Algol for the PDP-8. (Then again,
that's not a true compiler -- it compiles to an intermediate form that
looks very much like a subset of the Burroughs 5500 instruction set.)
Using an IL was a way of making the complier easier I'd guess.
Compiler deign has become more sophisticated since.
I dunno about that. I just read (and worked out on paper)
Randell's 1964 ALGOL IMPLEMENTATION book. Algol had(has) stuff no
(or few) language has today, like runtime evaluation of stacked
dynamic arguments.
As far as sophistication goes -- a better measure than simply how
clever or nifty a thing is -- how far did it advance the state of
the art? Good Algol's in the early 1960's look like stuff robbed
from the far-flung future. A lot of the
"compilers" from that era
we'd today call p-code interpreters
(terminology changes) but man,
Algol60 is neat stuff. (Not the bloated monster Algol68 (I think
it was) became.
The Whetsone Algol compiler ran, in one pass, as fast as the
source-input reader hardware, in 7000 words of memory! Though
slow, it's a full-featured language, unlike C which is basically a
portable assembler (I loved writing in C).
Algol had it's share of horrors, but man it is the basis for
nearly all modern languages. C's block and scope structure came
directly from Algol. Python's objects (the best done of any
language I've used, I hate to admit, since I find the python
culture utterly hideous) are directly analogous to the Whetstone's
scoping -- hell you could put OO structure into the Whetstone
compiler without ruining it!