Daily Thought - 2025-04-21
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!
I have laid out two competing approaches to error handling: One in the style of Rust, based on variant types and early returns in case of an error; the other based on checked exceptions. Both approaches are well-established in mainstream languages (Rust and Java, respectively).
If we look at error handling in isolation, both seem fine. But let's not forget, the premise for this line of thought is that we no longer have linear types, which means we need a different solution for tracking side effects.
And as I see it, there are two competing approaches here too: Monads and
algebraic effects. This choice mirrors the one for error
handling, because a Rust-like Result
type is a monad, while checked exceptions
are a subset of algebraic effects. It makes sense to consider both decisions
together.
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.