Daily Thought - 2024-07-05
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.
Caterpillar will be a functional language. There are many ways to define and explain this, but here's my favorite perspective: Everything that your code does is locally visible. So if you look at a piece of code, you won't be surprised by its behavior. All it can possibly do, is encoded in its arguments and return values.
This is not just good for your, the developer's, understanding of the code. It also helps the machine. I've mentioned rewinding before, but there are other cases where this is useful. A compiler or interpreter can look at a piece of code, and immediately decide what can be run in parallel, for example.
I've been talking about tracking I/O, and this is what I mean by that. If I/O is to happen, it can't just be hidden inside of a function. It must be visible outside of that function. In its signature, ideally even in the code that uses it. There are multiple ways of achieving that though, and I'd like to talk about those over the next few days.
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.