Unison 1.0 Released
Unison 1.0 was released today. When I first came across it, Unison was basically a toy, but I loved a few of the ideas, so I've been following along. Now that it's reached this level of maturity, I'm going to have to play around with it more seriously.
The major idea is to make terms content-addressed. Every top-level expression has a single unambiguous identifier (a 512-bit SHA3 hash) that can be calculated from the subexpressions.
- Code only needs to be compiled once on a machine, with the result stored under its hash. Larger expressions can be compiled incrementally, since their named subexpressions have already been compiled.
- Code can be easily moved from computer to computer since every expression has a canonical representation (implied by the ability to always calculate a hash identifier), and the transmitted data can be easily verified using its own hash identifier.
- Because everything is content-addressed, the language's runtime / image / compiler system are your version-control system. Git content-addresses the files added to its system; Unison has a leg up since the language guarantees content-addressing of all code.
- I'm particularly interested in the fact that it is easy in this language to handle multiple versions of "the same" structure. The latest version of your program will reference the type of the data (e.g.
Transaction) by name, but previous versions ofTransaction(perhaps missing newer attributes) can still be referenced in the latest version of the code by their hash identifiers. With care from the engineer, this should allow nearly perfect backwards and forwards compatibility — a conversion function can be made to upgrade (if that's possible) or downgrade from one version ofTransactionto another. Imagine APIs where the client and server don't have to be completely in sync, because the server can always accept old versions of input data and upgrade them to the latest version.
Unison also uses an effects system to encode important expression semantics (usually side effects) in an expression's type. I've never worked in a language that uses one; I'm curious, as I've been told they're more ergonomic than monads.
Now that it's reached 1.0, I'm going to get serious about digging into the language more. More to come under the unison tag.