Holochain & Unison language: Content-addressed code

Unison language seems to implement some powerful features of the Ceptr vision. Was mentioned by user piotr_trzpil mentioned it a couple years ago Holochain and Unison language .

“No more writing encoders and decoders at every network boundary. Say where you want computations to run and it happens :crystal_ball: — Dependencies are deployed on the fly.”

“No more writing encoders and decoders at every network boundary. Say where you want computations to run and it happens :crystal_ball: — Dependencies are deployed on the fly.”

“Other tools try to recover structure from text; Unison stores code in a database. This eliminates builds, provides for instant nonbreaking renames, type-based search, and lots more.”

“Many dependency conflicts arise from definitions competing for the same names. Since Unison references code by hash instead of by name, an entire class of conflicts can be eliminated.”

“Your codebase is always live and typechecks, even in the middle of a refactoring. Unison has structured refactoring sessions, not a big misleading list of type errors.”
(^from their website)

Code is stored as content-addressed syntax trees - based on hashes of function code. This means functions with identical definitions modulo variable name, are deduplicated - and variable names are are developer-interface feature, can be changed locally without a code-base wide change.

We can have variable names presented in different languages to different users with the actual codebase being identical. This seems very powerful for minimizing a global codebase (genome?), and mass memoization.

This approach would work very well for decentralized distribution of code/data/programs with reused modular components. And generally, decentralized codebase management.

The functional approach (no side effects) & the type system supports correctness, and ease of development, since functions are all indexed by type as you write code.

I think Holochain could benefit by working w/ Unison or leveraging some of the ideas they have implemented - would love your perspectives!

2 Likes

I’ve been thinking about this (holochain + unison) a lot as well. I keep checking in on Unison, and wish that it (and it’s concepts) were proliferating and iterating much faster!

1 Like