Caterpillar

Daily Thought - 2024-08-23

< back to list

Caterpillar is currently untyped. This means that everything is a 32-bit word, and depending on which function you call, the arguments will get interpreted as whatever types the called function expects. This isn't ideal, but it's simple and was easy to implement.

The end goal is a static type system, but I expected to have a dynamic type system on the way there, as an intermediate step. I no longer think this is going to happen. It seems more likely, that we'll transition from untyped to static typing directly. As it turns out, "no type system" and "static type system" are pretty similar.

In both cases, the runtime knows nothing about types. Whatever typing exists, the compiler keeps track of. Right now, this means the compiler keeps track of no types at all, but it's easy to imagine how that can change gradually. From this perspective, a dynamic type system seems like a detour. It would require significant changes to the runtime, which would then get reverted again later.

<< previous thoughtnext thought >>