Sharing in Dada

7 points by Hytak


Hytak

If I understand correctly, the idea can be summarized like this: Every allocation gets the memory layout of Arc, but initially they do behave like Box. Sharing an allocation is very cheap and works recursively, because there is no need to reallocate.

fanf

previously

Student

This was an interesting read. It reminds me of hylo. Maybe someone who has paid close attention can elucidate the differences.

tjammer

This is interesting. It reminds me of the this paper about mutable value semantics where every heap allocation is ref counted, although this post doesn't mention copy on write but instead shared values are immutable so you get value semantics that way. They mentioned writing about mutation in a later post. The real kicker here is that you get a mutable Rust-like single ownership world as well, and values seem to be able to transition from single ownership to shared.

My personal language started with ref-counted MVS and went into a Rust-like direction with a borrow checker because it didn't feel great to have to pay for the atomic ref updates all the time. I didn't think to combine the two this way. Can't wait to see where this goes.