4 ms·
I see the attraction of stack-based languages. Composing functions by concatenation is simple and expressive, but at some point it hits a limit and turns into s
by nils-m-holm 8y ago
I see the attraction of stack-based languages. Composing functions by concatenation is simple and expressive, but at some point it hits a limit and turns into stack juggling, where you have to keep track of a lot of state on the stack (or stacks). This is even worse in low-level FORTH, but still noticeable in higher-level stack languages, like Joy and, probably, lang5.
Klong (http://t3x.org/klong/ http://t3x.org/klong/) also started as a stack language, but I soon grew tired of keeping track of the stack, so I wrote a compiler that translates K-like syntax to a stack machine program. You can still see the underlying stack language when you start the interpreter withe the -d command line option.