Forth – not quite dead

In my previous post, Thinking in Forth, I said that Forth is a dead language. I did this to make two points. The first is that I don’t have to revive or advocate a dead language, hurray, because that’s boring. The second point is that even a dead language still has value, like Latin does. However, just because I consider it to be a dead language doesn’t mean that everyone else does too.

Forth words

Forth is an excellent choice for education for several reasons:

  • it’s small, maybe 25 required core words
  • most of these words are one, two, or three letters long, so familiarity with English is not a prerequisite for learning Forth
  • it’s simple with no built-in abstractions – source code maps directly to assembly code (a Forth word is just a list of calls to previously defined words)
  • it has little syntax to learn
  • there is only one data type in basic Forth – integers (called ‘cells’)
  • useful programs can be written early in the learning process
    (a Forth program is just a list of one or more Forth words)
  • it’s very ‘bootstrap-able’ – one learns by concatenation, not starkly delineated ‘levels’
  • paradigms such as object-oriented and functional programming are consistent with Forth (and in fact many of them have often already been very well implemented and documented)
  • concatenative programming is much more pure and natural
    See Threaded Nature
  • syntonic programming is easier learn and use
    See Forth: A Syntonic Language
  • Forth is useful for building models and simulations
  • open and non-proprietary versions of Forth are freely available for a wide range of platforms

There are several efforts at delivering basic, classic Forth to beginning programmers. One that I particularly like is 4E4th which runs on a tiny, inexpensive protoyping card.
The Raspberry Pi can easily run a bigger, more capable Forth.

Several commercial enterprises continue to promote Forth. Some can be found towards the end of the excellent and extensive Forth page on Wikipedia

The creator of Forth, Chuck Moore, is a tireless, brilliant, and dynamic force. He has never stopped developing cutting edge technology and innovation based on Forth. For a look at some of his latest work, here’s a talk he gave in September 2013 on the ga144 chip. It has 144 cores, with energy measured in picoJoules per instruction and power in nanoWatts per core, and is of course programmed in Forth. That’s hardly dead technology.

So, while I do not aspire to revive Forth or advocate it generally, I may have been in error in describing it as dead. I come to praise Forth, not to bury it.

Leave a Reply

Your email address will not be published. Required fields are marked *