Are concatenative languages alive? (FORTH, etc...)

Good day.

Do you think, are concatenative languages still alive for some narrow cases?

I like the FORTH approach of making the simplest language for tiny scripting and config files, which anybody can implement for himself in a few evenings, but only in case of avoiding classical FORTH bit-banging and faults on erroneous integer addresses on the stack. Also maybe some very lite runtime typing should be added via using shadow type-tagged memory and stack, or just using an object stack VM and vocabulary/stack on dynamic data containers?

Why I think that FORTH-like tiny language can be still used, as is it looks to be the best for IoT and embedded applications in the form of the CLI on a serial console – this case was the first use and target when the original FORTH was developed in 70th, with the same limitations (slow computers with very small RAM). I’m saying not only about the human interface but as text-based extendable protocols mostly.

Forth still lives in the IoT environment in the form of Open Firmware (IEEE 1275), which standardizes the OpenBoot framework that Mitch Bradley invented at Sun. Many interpreters (Python, for example) use “threaded” (mostly byte-code) implementations, and there is of course the Java VM. These threaded implementation backends are typically limited in capabilities relative to a full Forth implementation–security is a big issue for modern computing environments–but the principles live on.

1 Like

Concatenative languages hold all the records for minimal token number programs. There are ways to write JS in concatenative style, as evidenced by the astounding achievements of Oscar Toledo and his chess programs (Toledo Javascript Chess Game), and PostScript being a concatenative language is used constantly in Postscript PDF documents, which are omnipresent. APL reformulated itself as J, and has a small following.

The reason concat languages have fallen out of favor, is that companies over time have learned that this language style is “write only”, and the ability to transfer responsibility for the code base to someone else is very poor. So instead dumb, low density languages like Python have become more popular over time. Software lasts decades, has to pass through many hands, and concat languages are like cryptograms.

1 Like