Caterpillar

Daily Thought - 2024-07-23

< back to list

Besides types and effects, there's more about Caterpillar code that the tooling could infer. Let's look at Rust for a moment: It has a distinction between supposedly cheap (and hence implicit) copies, and potentially expensive (and hence explicit) clones. (This doesn't work perfectly and might get changed, but we can ignore that here.)

This distinction makes sense, and we might or might not end up having something like that in Caterpillar. If we end up not having it, we could get the same effect (or maybe even do better) by inferring and displaying information about performance characteristics of your code.

Imagine looking at a function, and having each expression color-coded, based on their relative cost. This could be based on heuristics, or actual measurements. Either way, it's another example of the principle I've been talking about: Designing the language with tooling in mind allows us to make certain things explicit, without requiring the developer to actually write them out.

<< previous thoughtnext thought >>