Daily Thought - 2024-06-29
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.
I've been talking about changing binding statements, which modify the current scope, into binding expressions, which create a new scope. But there's a disadvantage to that technique.
What if, within the scope that your binding created, you need to create more bindings? Then you have a scope within a scope. Which could create another scope, and so on. If this nesting goes to deep, surely that will offset any advantage you get from not modifying the current scope.
I guess you can alleviate this by keeping your functions short, which seems like a good idea anyway. And there's probably lots to be learned by studying how this kind of thing is handled in languages like Haskell. Either way, I think this might be something I need to test for a while in Caterpillar, to see how it works out.
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.