Caterpillar

Daily Thought - 2024-05-03

< back to list

Caterpillar uses postfix operators, instead of the more common prefix and infix operators. Postfix operators are less familiar, which can make them unappealing. So why did I decide to go for them anyway?

First off, I'd like to observe that many languages provide all three kinds of operators. Let's take Rust as an example. It provides prefix operators through function calls (add(a, b)), infix operators through built-in operators (a + b), and a limited form of postfix operators through method calls ((a, b).add()).

I want to avoid this complexity in Caterpillar. Obviously, one of them would do; Lisp and Forth are proofs of that. And I believe, if you can only have one of the three, then it should be postfix. Over the next few days, I'd like to talk about why I think that is.

<< previous thoughtnext thought >>