Caterpillar

Daily Thought - 2024-07-05

< back to list

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.

<< previous thoughtnext thought >>