Daily Thought - 2024-07-19
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!
This thought was published before Crosscut was called Crosscut! If it refers to "Caterpillar", that is the old name, just so you know.
I talked a bit about linear types on here, but there's one important aspect I completely forgot to mention: Linear types can track ownership, and thus can be used to implement automatic memory management at compile-time, like in Rust.
That is very important to me. I think there are so many reasons to not want a garbage collector. It's a big black box that's running in your process, doing its own thing. Granted, for a purely functional language, there are better approaches. Roc can get away with just reference counting, since immutability means that reference cycles can not be constructed.
But I'm thinking, if Caterpillar is going to get linear types anyway, for all the reasons I mentioned, why not go that extra step and get automatic memory management with no runtime overhead? I think Rust has shown us what's possible. Now it's on the next generation of languages to show that, hopefully, we can do the same, but without much of the complexity.
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 whenever I post a new one.