Crosscut

Daily Thought - 2024-06-26

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

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 >>

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.