Crosscut

Daily Thought - 2024-09-10

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

I've talked about inference before. How Caterpillar's compiler could infer information about the code, and still make that explicit by storing that in the code database, where it can be displayed by tooling. I've thought about some more things that can benefit from this approach.

My current plan (we'll see how far that goes) is for Caterpillar to not have references, which would simplify the language greatly. If everything is immutable, then a reference is semantically the same as a copy, and therefore redundant. You'd still want them for performance though, and the compiler can use them under the hood as an optimization technique.

Speaking of immutability, same deal here: You need mutation for performance, and the compiler can make it happen under the hood. With a linear type system, both of those techniques should be practical. And with pre-compiled code as the canonical representation, the developer can see where either is happening, and how changes to code affect that.

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