Are C or C++ The Only Viable Languages for a GC

Posted by user95312 on Programmers See other posts from Programmers or by user95312
Published on 2013-06-30T14:57:54Z Indexed on 2013/06/30 16:27 UTC
Read the original article Hit count: 239

Filed under:
|
|

Background

I have just finished writing a compiler for a functional language compiling to the JVM as a learning project. However, since I'm just doing this to learn, I thought it might be interesting to write a native backend and a RTS for it.

As I've been planning out what this new backend will look like, the one point I'm stumbling on is the garbage collector. I've implemented the compiler in Haskell. But I have no desire to write the GC in Haskell since, while it may be possible, it'd suck.

Question

I've looked at several FOSS garbage collectors prior to posting and most of them were implemented in good old ANSI C. Is this still the most accepted choice for writing a GC nowadays?

I've seen that this site tends to frown upon questions with multiple answers so I hope this will make it more specific: If some startup was writing a professional grade gc today, are the only viable choice for them C or C++?

It's my first question here so please comment and let me know if this question is ill-suited for for programmers.

© Programmers or respective owner

Related posts about c++

Related posts about c