Crosscut

Daily Thought - 2024-06-20

Hey, I'm Hanno! These are my daily thoughts on Crosscut, the programming language I'm creating. If you have any questions, comments, or feedback, please get in touch!

This thought was published before Crosscut was called Crosscut! If it refers to "Caterpillar", that is the old name, just so you know.

< 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 >>

Hey, you! Want to subscribe to my daily thoughts? Just let me know (maybe include a nice message, if you're up for it), and I'll send you an email whenever I post a new one.