Daily Note - 2024-07-11
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!
This note was published before Crosscut was called Crosscut! If it refers to "Caterpillar", that is the old name, just so you know.
Speaking of Rust, why do we need this business with
linear types anyway? Why not just have something like
Drop
, which is Rust's implementation of
destructors?
Destructors can work in many cases, but what if the
destructor needs to do something that returns an error?
Where would that go? What if the destructor needs to
call an operation that's async
? Those are
real problems in Rust.
But it's not a problem with linear types. The compiler forces you to do something with a value. But what you do, where you do it, what resources you use to do it; that's up to you.