Caterpillar

Daily Thought - 2024-06-26

< back to list

Caterpillar allows you to bind operands to names, using a binding operation. (In most languages, this would be called "assigning a variable".) Those binding operations are statements. They do not return a value. Instead, they modify the current scope.

Functional programming languages tend to work differently. I'm generalizing for the sake of brevity, but in a functional language, everything (including the operation that binds values to names) is an expression. And binding a value to a name creates a new scope where those names can be used.

I am intrigued by this concept. If you can't modify the current scope, then there is less context you need to be aware of to understand any given expression. You still need to be aware of some context, but it is more obvious what that is. Over the next few days, I plan to explore this concept a bit more.

<< previous thoughtnext thought >>