Why does Forth implement the rot
operator, and why does it operate on exactly the three top-most items of the stack?
Is it just for convenience or would Forth not be Turing-complete without such an instruction? Is the number of three the minimum viable option to be Turing complete?
I can imagine one could implement rot
with pick
or roll
. So if there was none of these three operations, would it still be Turing-complete?
Take a peek at some minimal FORTH, like jonesforth or lbForth (both are git repositories). It is rather surprising how little in terms of primitives is required to get off the ground.