I misspoke slightly in my previous post, what I meant to say was that I "comment" concatenative code with stack diagrams. For any non-trivial code, I comment each line that modifies the stack with a stack diagram. -- Don Groves
The solution to the problem you state so well about keeping track of stack contents is to document your code with stack diagrams! Ive been doing this successfully since the early 1980s with Forth. Not only does it help relieve the cognitive load while coding, it pays for itself a thousand times over when revisiting that code weeks or months later. -- Don Groves