Screenshot of Catenary

Well, it took a while but today I'm proud to release Catenary, a concatenative programming library for Javascript.

When I first saw Forth and Factor I didn't really think much of them. Mostly I messed around a few times, figured out that doing arithmetic was super tough and then got bored. It was only later on that I began to realise the elegance of making a language with so little in it. That elegance ended up prompting me to start messing around with what eventually became Catenary.

Although it took several rewrites to get there, I'm fairly chuffed that there ended up being only 76 lines of code in the core. On the way I managed to throw out nearly every concept I started with, and in fact part of what took a long time was getting stuck because I threw out one too many and had to go back. So I'm fairly confident there's not much left to trim. Along the way I ended up learning a lot of significant stuff about why concatenative languages are the way they are, and which particular concepts are unnecessary sugar and which are actually fundamental.

I'm not sure if concatenative-programming-in-the-large will ever hit the mainstream, but I think that, like functional programming, it can supply a really interesting framework to structure your ideas around. Catenary was designed in that spirit - it's meant to supplement traditional Javascript, not replace it. If you can go in and out of concatenative style at will, maybe the result will be that certain problems begin to look much easier.

If this project managed to make people think about concatenative patterns in regular code the way they do about functional ones, that would really be something amazing.