Hacker News new | ask | show | jobs
by progman 3439 days ago
Yes, there are plenty of options. However, most of those options lack something while Forth is all-inclusive. All your options have no compiler while Forth compiles to threaded code which is pretty fast, about 1/10 the speed of assembler according to my experience. Your options have a linear space consumption while Forth code compiles "logarithmic" due to its extensible vocabulary. That means, if you have an 8K system (like on my former PET-2001) you need 4K for a convenient basic Forth for instance, while you can put a lot more stuff in the other 4K, due to the threaded code.
2 comments

Well, TinyBASIC was available as both an interpreter, but more often, as a compiler.

Though it was a primitive compiler compared to today, due to the size of the language, it easily fit within 2-3kb, which on your 8kb system, would leave 5kb or more for program memory.

In fact, some TinyBASIC systems had a virtual machine and JIT compiler in 120 instructions, or around 2kb, as early as 1964.

Though BASIC is slower than Forth, or was in those days, the main benefit is instant availability. BASIC syntax was the jumping on point for more than a few programmers, myself included, because of it's simplicity.

Btw. for those who are interested in Forth, I recommend to read the "Forth Dimension" archive. It was rightly called the "best special-interest technical magazine ever".

http://www.forth.org/fd/FDcover.html