Caterpillar

Daily Thought - 2024-06-20

< back to list

I favor postfix operators for Caterpillar. Those come with a stack-based evaluation model, and stack-based languages tend to have a puristic view on this. There's often just the stack (or multiple); variables don't exist or are discouraged. I find that style alien and hard to understand. And believe me, I've tried.

Earlier prototypes (and also the current one in its earlier days) had a much stronger focus on the stack, than is the case now. Maybe (probably!) I was just doing it wrong, but I found this made code very hard to maintain. It also made it quite easy to introduce bugs. It happened often, that some function, under specific circumstances, would fill up the stack with leftover values.

Fortunately, I don't think such a pervasive focus on stack-based evaluation is necessary for Caterpillar, postfix operators or not. Nor do I believe that it is the most promising direction to take. The language, as it works right now, has a very constrained data stack. It's embedded into a more traditional model. I'll talk some more about that tomorrow.

<< previous thoughtnext thought >>