Daily Thought - 2024-04-13
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.
Yesterday, I talked about the platform concept that I'm stealing from Roc. That concept doesn't just improve portability. It's also good for security.
If every I/O primitive that a library can use must be passed as an argument, that means you know exactly what a given library can do. It won't just access the filesystem and read your data unexpectedly. And you can further increase security by making access more fine-grained. Pass a limited instance of the filesystem interface, that just allows access to the specific directory that you expect a library to write to.
And by treating access to heap memory as an I/O primitive, as I intend to do in Caterpillar, you can even apply this concept to memory safety.
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.