3 ms·
Forth style threaded code was used not just for Forth - it was popular strategy for implementing higher level languages at one point, especially to reduce size
by p_l 2y ago
Forth style threaded code was used not just for Forth - it was popular strategy for implementing higher level languages at one point, especially to reduce size of resulting binaries.
Funnily enough, some later more advanced compiler systems could be considered to have bits resembling that in code generation, with Virtual OPerations that abstracted CPU instructions (often more than one).
And indeed, threaded interpreters are one of the efficient ways to implement VMs in resource constrained setups.