(no title)
mbfg | 5 months ago
I mean, that's pretty much every language. The main difference is that the programmer's access to it is unconstrained by things like method call definitions.
mbfg | 5 months ago
I mean, that's pretty much every language. The main difference is that the programmer's access to it is unconstrained by things like method call definitions.
vdupras|5 months ago
addaon|5 months ago
Like Forth, Ada has two stacks. Unlike Forth, which uses two stacks to simplify the language, Ada uses two stacks to complexify the language. This generalizes to other language features.
kragen|5 months ago
FORTRAN up to FORTRAN 77 didn't support recursion, including indirect recursion, so that you could implement it without a stack.
By contrast, in Forth, instead of registers you use the operand stack. For loop counters you use the return stack. Sometimes you can use the operand stack instead of variables as well, although I think it's usually a better idea to use variables, especially when you're starting to learn Forth—it's much easier for beginners to get into trouble by trying too hard to use the stack instead of variables than to get into trouble by trying too hard to use variables instead of the stack.