2 ms·
Forth is available for more platforms than C, and like C, it is usually but not always a compiled language. Because Forth always has an interpreter, and a powe
by samatman 4y ago
Forth is available for more platforms than C, and like C, it is usually but not always a compiled language. Because Forth always has an interpreter, and a powerful one, it's more obvious that Forth doesn't have to compile to run, but again, true of C as well: https://gitlab.com/zsaleeba/picoc https://gitlab.com/zsaleeba/picoc exists, and it isn't the only one.
Edit: an important difference between them is that C implementers take the standard very seriously, while Forth is culturally resistant to standardization, Chuck Moore being on record as having considered it a bad idea, and disliking the resulting ANSI Forth language.
If the goal is to compile "the same code everywhere", well, good luck doing that with C, but with enough #ifdefs it can be done. The Forth approach is to have a personal base layer of words, which one either adapts or implements for a given system, and target the rest of one's code at that dictionary.