Daily Note - 2025-05-18
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!
I have two more notes on postfix syntax in the pipeline. But first, I'd like to stop for some updates:
- I implemented bindings! For now, only in the form of function parameters. But
using an anonymous function that you evaluate immediately, it should be
possible to simulate
let
bindings. I plan to add those as syntax sugar later. - This means that recursion (which has been in the language for a while) should now actually be usable. Before, it was possible to write recursive functions, but I struggled to actually do something with that.
- To simplify things in advance, I moved function resolution to runtime, making the language much more dynamic. Not the direction I want to go in, but I think it's what I need right now: A much simpler compiler and less complexity overall, making it easier to make progress where it matters most.
I had some trouble accommodating the expanded syntax tree required for this. For a while, I went down the wrong path there, making things way too complicated. In the end, I realized that a much simpler, less type-safe, uniform syntax node representation would work better; so that's what I went with.
What I should be doing now is verify that recursion is actually usable, and use that to write a test which demonstrates the lack of live code updates (or hot reloading; whatever nomenclature we end up going with). That's the next priority, as I want to build everything else around a tight, interactive core.
What I did instead, was sucker myself into doing some code cleanups. This is important too. After all, getting to terms with the shape of that thing I'm writing; the code database, the incremental-only compiler that it implies, the editor that drives that; is a constant struggle. And maybe it also serves as a bit of a break for me.
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.