3 ms·
Forth is metaprogrammable machine language in the way that Lisp is metaprogrammable expressions. Each is a local optimum of programming languages, meaning that
by gruseom 15y ago
Forth is metaprogrammable machine language in the way that Lisp is metaprogrammable expressions. Each is a local optimum of programming languages, meaning that any other language that tries to do the same thing ends up being either isomorphic to it or not as powerful. In other words, a version of PG's thesis about Lisp holds equally for Forth in its neighborhood.
But Forth has one major advantage over all other such languages: it's a generalization of the hardware.
Every metaprogrammable language other than Forth is a generalization of some abstract primitive (s-exprs for Lisp, objects for Smalltalk), which leaves a gap at the bottom that must be bridged before anything can be executed. These languages all struggle to get to the machine. Consider the decades it took to make Lisp fast. In Forth, the primitive is the machine. This is so extraordinary a position to occupy -- full metaprogramming all the way up from binary -- that I wonder why we don't see more amazing things done with Forth. Of course, majority practice is not correlated with computing greatness.
I think this extraordinary quality of Forth is connected to how Forth grew out of a working programmer's projects. Lisp came from math, Smalltalk from language research. It's worth remembering that Moore learned Lisp from McCarthy before he invented Forth. Forth is a Lisp hacker's attempt to make something he could use in commercial projects on mid-60s hardware.