21 ms·
> This is also a challenge, as Forth usually requires machine language, call stack access, and is naturally written in assembler. Not really. Many implementati
by astrobe_ 1y ago
> This is also a challenge, as Forth usually requires machine language, call stack access, and is naturally written in assembler.
Not really. Many implementations indeed do that, but only in pursuit of performance - the weakness of interpreted languages is speed. Otherwise one can just implement it as a bytecode interpreter, like e.g. Lua.
- s-macke 1y agoMy code uses some kind of very abstract byte code in a global heap []any structure (threaded code). "any" can be different types including Go functions. But most of them are pointers as usual in Forth.