## Callisto: building a minimalist language on "versioned objects"

Callisto -- Versioned objects (github)
Wyago
2015

This is a micro prototype on how a versioned objects would look in a programming system. It's a horrific implementation (and system) meant only to explore ideas, so it ignores reality in many ways, including performance and memory usage.

The syntax of the language is similar to that of the Io language (at iolanguage.org), hence the name Callisto. The object model is pretty weird though. Instead of having an object with slots, objects are simply stored as a simple union type of Base, the root of the object tree, or a Delta with the name of the slot being changed, the value it's being changed to, and the parent of the delta. (There's also an error value with a string describing the error, but that's not part of the object system itself, it's just a tool for expression evaluation errors.)

An object looks like a simple line of deltas leading back to base:

 Base ← x is 10 ← y is 10 ← x is 20

You can note that this is kind of similar to a git commit chain (or any vaguely similar system; you're probably pretty familiar with git as a specific example though). This example could, for example, be a point with a coordinate. It's interesting to note that it's modification history is encoded in it's delta chain. This is obviously horrible, as it means any mutation will leak memory. There could certainly be a variant of garbage collection that resolves an objects current state and eliminates old changes that are no longer relevant.

The designer, Wyago, seems interested in experimental micro-languages, and recently posted on reddit about another minimalist language based on term rewriting, called Mantra.

I think the language lacks examples.

## Comment viewing options

### Obvious problems

There's a section on "Obvious Problems" but where's the section on "Benefits"? I agree examples would be useful.

### Possible applications

I’m reminded of LVars. You could have multiple concurrent “mutations” of thread-local histories of the same object, which could then be merged after the fact. There’s some relation to STM here as well.

The intuitive parallel with Git makes me think of a “content-addressable object system”, whatever that would mean—it certainly sounds awesome.

I doubt you would want this behaviour for every object in a system, but it could be a nice library or addition to a language.

### Eh, with Glitch, it is the

Eh, with Glitch, it is the behavior of every object in the system. All state is versioned, changes trigger re-executions, time travel is just looking at previous time-indexed versions. The only difference is that Glitch uses compressed checkpoints rather than deltas (checkpoints are also collected after a certain amount of time that we don't want to time travel before).

### Prototype inheritance?

This looks a whole lot like prototype inheritance, like from JavaScript.