News for hackers. Stuff that matters.
Re:Building a lower-latency GC by amelius on Saturday April 11, 2015 @09:12AM (#9359323)
It would be extremely useful if GC solutions were built in a more language agnostic way. This would allow language designers to pick a GC that suits their needs, instead of reinventing the wheel every time.
Re:Building a lower-latency GC by mjn on Saturday April 11, 2015 @11:09AM (#9359589)
This is discussed now and then, but it's difficult to get all the architectural pieces to align to make it really work. A GC needs some kind of cooperation with the language, so you need to agree on common interfaces, which is a bit of a coordination problem.

One of the goals of the now-defunct C-- project was to do that by providing a low-level target language for compilers, which also had a portable set of GC hooks. But it didn't reach that goal before running out of funding/developers. The most popular current target language filling similar space is the LLVM IR. LLVM has some goals regarding enabling GC via standardized hooks, but not rising to the level of actually providing a language-agnostic GC: http://llvm.org/docs/GarbageCollection.html#goals-and-non-go...

Another option is to plug in a collector like Boehm (http://www.hboehm.info/gc/) or MPS (http://www.ravenbrook.com/project/mps/). Boehm or the conservative mode of MPS sidestep some of the integration/architecture issues, with various accompanying downsides.

Re:Building a lower-latency GC by benjiweber on Saturday April 11, 2015 @09:19AM (#9359337)
Perhaps we could have some sort of virtual machine, which could allow different languages that target it to share garbage collection solutions? ¬_¬
Re:Building a lower-latency GC by amelius on Saturday April 11, 2015 @09:48AM (#9359412)
I was thinking of a solution that is a little more orthogonal (modular). The JVM for example, is overdesigned for this purpose. One problem it has, is that it doesn't support proper tail call optimizations, and this affects most functional languages targeting this virtual machine. The GC of this VM, however, would be perfectly suitable for these languages.