Daily Thought - 2024-07-30
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.
Caterpillar will be a purely functional language, which means everything you really need to know about a piece of code, you can see by looking at it. If that code calls a function, you can be sure that the function doesn't implicitly update some global state. Everything that function can do, is encoded in its parameters and results.
A side effect of that, is that it should be quite easy for the compiler to parallelize code automatically. Take any piece of code and exploit its inherent concurrency by compiling to machine code that runs on multiple threads. But if the compiler does that, it gets harder for the developer to understand the runtime behavior of their application.
But what if auto-parallelization happens in the pre-compilation step that produces the canonical representation? Then the already parallelized code will be stored in the code database. The developer sees exactly how the code will run, can tweak the auto-parallelization parameters to influence the result, or overrule a decision outright.
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.