Daily Thought - 2025-04-16
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!
If you represent errors using variants, and any function just picks the case of a variant that it can operate on, and doesn't change anything about other cases (that's automatic lifting), then you seemingly end up in a sort of sweet spot.
You can just ignore errors in the prototyping phase, but they're still there. At any point in the code, you can see which errors could have triggered there. If you change your mind, you can swoop in and add code to handle them. And on top of that, there's not going to be much repetitive code, since those variants are structurally typed and can be generated by the compiler.
That means all my design goals are met. Awesome, right? Not quite. Because I no longer think that automatic lifting can actually work in practice. And so this whole scenario is not possible. Let's get into that tomorrow.
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 every time I post a new one.