News for hackers. Stuff that matters.
Re:Is reference counting slower than GC? by pjmlp on Tuesday May 24, 2016 @05:51AM (#11760115)
Another thing is the usual issue that tends to get omitted, how GC enabled languages like Modula-3, Oberon(-2), D among others, do allow for a finer control of the GC.

In Modula-3, I can either fully rely on the GC, do safe global and stack allocations, or if really needed make use of manual memory management in unsafe modules.

So it is not as all allocations need to be on the GC heap, in GC enabled languages.

Re:Is reference counting slower than GC? by rubber_duck on Tuesday May 24, 2016 @06:17AM (#11760217)
I'm not sure about the others but the D model is probably the worst of both worlds - you can transparently store a GC allocated reference in to unmanaged heap and risk having dangling pointers after a random collection or you have to root everything you allocate increasing the scan.

Something like Rust has a type system powerful enough to track such things so if you added GC to Rust you could deal with it sanely.

Re:Is reference counting slower than GC? by pjmlp on Tuesday May 24, 2016 @06:40AM (#11760322)
D suffers from not having a good GC implementation in first place.

There is someone improving it with this year during a GSoC project.

Re:Is reference counting slower than GC? by rubber_duck on Tuesday May 24, 2016 @09:16AM (#11761254)
This is true as well but at least that part is fixable (although I'm not sure it's in the realm of a GSoC project considering the kind of work that went in to stuff like various JVM GC implementations)
Re:Is reference counting slower than GC? by pjmlp on Tuesday May 24, 2016 @09:30AM (#11761335)
They are mainly making it precise as stepping stone for further improvements.

https://summerofcode.withgoogle.com/projects/#62055978295623...