3 ms·
A safe GC would be immutable by default, so you end up with a lot of Cells (or worse, RefCells) to emulate a mutable GC like JS or Go.
by eddyb 11y ago
A safe GC would be immutable by default, so you end up with a lot of Cells (or worse, RefCells) to emulate a mutable GC like JS or Go.
- Manishearth 11y agoPretty easy to do `type MyGc<T> = Gc<RefCell<T>>`. Even better, put trait objects everywhere. Now we're Java. Go sit in a corner and think about what you've done :P When designing rust-gc with mystor at one point I joked about writing a syntax extension that converts everything in a crate to a GCd, RefCelld, trait object, so that Java programmers have no problem converting.