News for hackers. Stuff that matters.
Re:How recursion got into Algol 60: a comedy of errors by munificent on Friday August 28, 2015 @01:55AM (#10133932)
I don't offhand, but that's what the article is referring to when it says:

> And this is what they wanted to remove because they wanted static allocation of procedure activation records.

From what I can tell with a bit of digging, machines/compilers back then didn't even use return stacks for subroutines. Instead, they used self-modifying code (!).

To return from a subroutine call, you'd do something like this:

1. When compiling a subroutine, add a JUMP followed by an address to the end.

2. When you call a subroutine, modify the code to change that address to point back to the callee.

3. Jump to the subroutine.

4. When it's done running, it hits the last JUMP and jumps back to the caller.

With this, you don't need any concept of a call stack at all. But it obviously prohibits recursion since the later call would trash the earlier one's return address.

Re:How recursion got into Algol 60: a comedy of errors by mhink on Friday August 28, 2015 @02:43AM (#10134018)
So instead of a call stack, you have a call linked list? That's a pretty wild world to imagine.
Re:How recursion got into Algol 60: a comedy of errors by FullyFunctional on Friday August 28, 2015 @12:10PM (#10136237)
Nothing wild about that. Implementations using frame pointers effectively have exactly that and in some architectures, like SPARC, this is mandatory. Furthermore, some functional languages (SML and some Scheme implementations) do this explicitly. For one this, it make call-with-current-continuation much simpler to implement.