Steven D'Aprano writes:
> Stephen J. Turnbull wrote:
> > MRAB writes:
> >
> > > Fortran also pre-dated stack allocation (I think), so local storage was
> > > static (and no recursion!).
> >
> > If FORTRAN [sic] predated stack allocation, what did Lisp use to
> > handle recursion?
>
> I don't see the connection. The first proposal for Fortran was 1953,
> with the first public release in 1957, while John McCarthy didn't start
> work on Lisp until 1958.
He didn't start work on Lisp the language, or Lisp the interpreter?
The language existed for some time before it occurred to people to
implement an interpreter, but implementing the interpreter was fairly
quick once somebody thought of it as I understand it. After all, once
you have the read-eval-print loop, lambda, cond, cons, car, cdr, a
data structure for symbols, and a data structure for the environment
that supports recursion (thanks to Bruce Leban for pointing out
off-list that this was an association list, not local variables on the
stack), you can define everything else from that.
AFAIK the public release of FORTRAN and the academic introduction of a
Lisp interpreter were pretty much simultaneous.
> But even if it didn't, there's no logical inconsistency between
> Lisp using stack allocation and Fortran not. (There's no evidence
> that I can see that either language influenced the other directly.)
As quoted above, "stack allocation" refers to the concept, not its use
in FORTRAN. There are lots of concepts that existed for decades
before being implemented in Fortran.[1] I was just curious whether this
was one of them. I'll go see if the Dragon Book has anything to say
about it.
Footnotes:
[1] Just as some concepts have waited for decades to be implemented
in Python. I suspect "alias" is one that will have to wait for a lot
more decades! Back on topic! Whee!