← Back to context

Comment by garmaine

5 years ago

Forth is Lisp, but with composition as the basic operator instead of application. The result, of course, is a wildly different language but one which inspired the same degree of fanaticism among its adherents in their search for simplicity and elegance.

A truly under appreciated language imho.

I rather disagree with your first sentence. Forth is not Lisp, nor is Prolog or APL Lisp, and none of these languages are one short conceptual leap away from the others. Even a very rudimentary Forth can express concepts which have only hazy correspondences in a Lisp, like words which twiddle the return stack or yield a variable number of results on the parameter stack.

I find it misleading at best to casually intimate that Lisp is some kind of ur-language which exemplifies simplicity and thus lies at the root of any design space. Fans of Lisp are overly eager to stake claim upon ideas which do not belong to their language.

I don't mean to bite your head off about it; this is just a trope I find tremendously frustrating.

  • The core of Lisp is a small set of rules about abstraction and application using lists. Forth, at its core, can be formalized with the exact same set of rules (one to one correspondence) but with stacks and composition as the operator. The languages are very VERY different, but there is a similar bare bone formal framework at the bottom.

    • I'm very new to Forth, but find this intuition really appealing; do you know of any examples that demonstrate/prove this correspondence?

      1 reply →

  • What Forth and Lisp have in common is that they're interactive language construction sets. You don't just write domain code the way you do in C. You invent a language that matches the domain and use that to solve the problem. Don't like the syntax? Change it. Don't like the conditional statement? Invent a new one. Don't like the compiler? Improve it.

    These kinds of operations are behind the curtain in C but they're accessible to everybody in Forth and Lisp.