Post

trynova.dev/blog/garbage... Last Sunday I discovered that lifetimes on #Rustlang garbage collected handles should be contravariant on their lifetime parameter. This is an open research question, but I think this opens a path to meaningful lifetimes on self-referential structs. Check it out!

trynova.devGarbage collection is contrarian · NovaModeling unrooted handles to garbage collected data using contravariant lifetimes.
AapoAlas@aapoalas.trynova.dev

I'm being a total nutcase, but I found what I think is an important discovery about modeling garbage collected handles to the #Rustlang borrow checker: the lifetime of GC handles is contravariant! Instead of validity "rising up the call stack" it "droops down from the heap". Blog incoming!

2 reposts9 likes

This was a nice read. It seemed to me like you were describing flight-recorder black boxes on commercial aircraft, with the contravariance. But later you said you wanted to shape a feedback loop out of it. I'll have to read it again in time.