Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Pretty 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: