Re:Announcing Rust 1.20
by burntsushi on Thursday August 31, 2017 @07:07PM
(#15144758)
I don't know the precise history, but at one point, it did have a "gc" type, which I believe was demarcated by the `@` sigil. So, for example, `@T` was a garbage collected pointer to `T`. IIRC, the actual garbage collector was simplistic, and was mostly just reference counting under the hood. At some point (in 2014, I think), the GC type went away. Since then, there has never been any serious talk of adding an optional GC to Rust proper, although many folks have worked/written about writing their own.
[ Parent
| on HN ]
Re:Announcing Rust 1.20
by steveklabnik on Thursday August 31, 2017 @07:26PM
(#15144879)
This is pretty accurate; however, a very long time ago there was a tracing GC!
Are you sure? I thought @ was reference counted in 0.6 and then removed after. Was it before that?
Re:Announcing Rust 1.20
by steveklabnik on Thursday August 31, 2017 @08:29PM
(#15145219)
I don't have any citation beyond "Graydon told me one time". It was like, very very long ago, possibly before @T even existed.
IIRC it was a mark and sweep GC in the OCaml implementation.
Re:Announcing Rust 1.20
by steveklabnik on Thursday August 31, 2017 @11:11PM
(#15145830)
That sounds about right.
Wow, I can't believe I have been reading up lately on official Rust documentation and still I was under the impression that Rust had optional GC. Thanks for sorting me out...
Well, I think is sort of does when you use the Rc types, right? It's just much more explicit than a type modifier, it's a type wrapper that requires requires some level of additional code ornamentation in some instances when using later as well. It's just not really any different than using a library in C++ that offers the same, except that in Rust's case the library is part of the stdlib.