Caterpillar

Daily Thought - 2024-09-10

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