Comment by Sammi
8 months ago
Rust does not make it simple or easy to reference objects from objects. You will be fighting the borrow checker if you try. This is what I mean.
The web standards have lots of references between everything. This type of object oriented programming means having lots and lots of cycles in your object graph. This makes Rust very veeeery unhappy. The Servo people are trying, and they have been trying for a looong time...
I don't understand, isn't this what Arc is for? An "automatically garbage" collected pointer? Or is it not well behaved for this use case (i.e. blowing the stack on free)
Arc is an atomic (not automatic) reference counter which can be used across threads. Reference counting in general can still be tricky to use when you need cyclical references though, which is what it sounds like the spec has.