Crosscut

Daily Note - 2025-05-04

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!

Using a free-form approach to structural code editing, makes changes to the syntax tree challenging. But there's an alternative: You don't let the user add and remove nodes freely. If they add a node, the editor also adds its required children. They can't remove a required child without also removing the parent. And they can't add extra children.

I'm calling this restricted (versus free-form) structural code editing. It is much easier on the compiler, since it doesn't need to cover as many edge cases. And updating a node becomes much simpler.

You no longer need to compile children after changing a node, because if the node changed, new (and suitable) children have been created. You don't need to re-compile a parent after its children changed, because changes to children can't make the parent invalid. The compiler becomes more efficient, and much more manageable.

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.