Comment by CodeArtisan
5 years ago
Any functional programming language shall have TCO since statements are forbidden (everything is a function).
5 years ago
Any functional programming language shall have TCO since statements are forbidden (everything is a function).
Or you could avoid (semantically) having a stack at all, as Haskell does.
I don't see how that could be done... Is it a result of laziness?
You just push the stack into the heap, and don't have a specific area which is the stack area. It's pretty common as a technique if you have something such as call-with-current-continuation.
The "stack" is still there in this case, but spread out over multiple heap blocks.
1 reply →