Think about it: the entire class of error of mismatched stack height doesn't exist in Lisps.
There could be an operand stack, if the Lisp is translated to a stack-based byte code; but it's managed so the programmer isn't concerned about it.
Think about it: the entire class of error of mismatched stack height doesn't exist in Lisps.
There could be an operand stack, if the Lisp is translated to a stack-based byte code; but it's managed so the programmer isn't concerned about it.
((a b +) (a b) add defun)
(((list pop) print) list while)
It helps me to read it in Japanese:"A to B wo tasu, A to B no paramēta no aru, 'add' to iu kansuu wo 'defun' shite."
"lisuto wo 'pop' shite, sore wo insatsu shite, lisuto ga kara de nai aida ni"
Interesting things happen. When we think about how 'add' is called, we follow it from right to left, contrary to the direction of speech of the Japanese sentence. The function add is called, the (a b) parameters receive argument values and the (a b +) is evaluated.
However, the chained application expressed by nesting, which people complain about being backwards (so they need to invent piping/threading macros to go left to right) now reads left to right! We do have to evaluate the while condition first, but then the pop and print to left to right.
But seriously, yeah computers are naturally 'Stack Machines' [almost] always, where they need the arguments pushed onto a stack before the 'verb' is executed.
So if we translate that sequence to language, stating the operands before the operation does follow the non-negotiable evaluation data flow.