Daily Note - 2025-05-07
Hey, I'm Hanno! These are my daily notes on Crosscut, the programming language I'm creating. If you have any questions, comments, or feedback, please get in touch!
Okay then, time to go into my reasons for switching away from postfix syntax as the current default. I plan to go over each one in detail later. But for now, here's an overview:
- The root of the syntax tree is not stationary in the upper-left corner, as it would be with prefix syntax. It moves around as you edit, up and down, left and right. This is weird to look at, and makes some edits outright confusing.
- Postfix syntax makes it natural to type the children of a node first, before the node itself. But restricted structural editing requires you to enter the parent first, before the children get created. This leads to awkwardness.
- Postfix syntax puts code into the order it's executed in, without the developer having to force that using bindings. But to make that actually work, you need some kind of combinators. Those don't exist, the design is unclear, and none of that will be a priority any time soon.
- The "series of statements" style that algebraic effects enable also has the consequence of putting more code into the order in which it's executed, further eroding this advantage of postfix syntax.
None of those reasons is a single big one that forced this change. But together, I believe, they form a compelling argument. And with innovation tokens being a recurring theme in my thinking recently, a critical mass was reached. Because not only does this change fix those problems, it also puts this part of the language into well-explored territory.
Hey, you! Want to subscribe to my daily notes? Just let me know (maybe include a nice message, if you're up for it), and I'll send you an email every time I post a new one.