Crosscut

Daily Thought - 2024-07-07

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.

< back to list

If anything that can be the source or target of I/O operations is represented as a value, then code is sandboxed by default. A third-party library can't log your keystrokes and send your password to a server, unless you pass it the values that represent the respective resources.

At the top-level of your application, the host can provide you with all the I/O resources that are available. It is your job then, to hand those out to the code that needs them. Maybe further restrict them, to provide access to a specific directory instead of the whole file system, or a specific server address instead of the whole network.

All of this may become a bit tedious at times. But I'm convinced that the benefits to security, but also the developer's ability to understand a piece of code at a glance, are going to be worth it.

<< previous thoughtnext thought >>

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.