4 ms·
The JS interpreter is pretty cool! We've had problems with closures before in Servo, I know that pain :) > implementing a garbage collector for Rust is sever
by Manishearth 10y ago
The JS interpreter is pretty cool!
We've had problems with closures before in Servo, I know that pain :)
> implementing a garbage collector for Rust is several orders of magnitude more difficult than merely implementing one in Rust.
Well, I mean it depends on what you're aiming for. Making a safe optional GC in Rust isn't too hard; rust-gc exists and is not very complicated. Making the compiler support arbitrary pluggable GCs is trickier. GC algorithms themselves can get so complicated that the state of the art research probably eclipses whatever has been done with rust-gc and similar "GCs for rust" so far. If you want a GC for Rust that contains a world-class collection algorithm the complexity is additive but the source of most of the complexity isn't the "for Rust" part, it's the "in Rust" part (A GC for rust will also typically be in Rust).
But also "optional" GCs like those that would be useful in Rust haven't been explored much either, so world class algorithms may not even make sense in this case.
It's ... an interesting set of problems, and very hard to make judgement about what is difficult :)
- saghm 10y agoThanks for elaborating on that! I'm definitely looking forward to seeing what you all do on the GC front for Rust in the future, even if it's a bit beyond my current comprehensions