Daily Thought - 2024-09-09
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.
There are other interesting things you can do with
comptime
in Zig. It also lets you control which parts of
your code get evaluated at compile-time.
I was going to to say, that we don't need this in Caterpillar. We can just guarantee that everything that can happen at compile-time does happen at compile-time. And then make that explicit using Caterpillar's tooling. But now I'm not so sure.
I think this might work for many programs, but if you're working on some one-off calculation that you'd like to later run on a powerful machine, then this could get very inconvenient. You'd need some way to control this behavior, and eagerly doing stuff at compile-time would be the wrong default. Not sure what the answer is here. I think it's fine to defer this question until later.
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.