Garbage Collection is a Hack (Adamant programming language)

Hi, I’m just dropping a link to a seemingly new language that will try to “solve” memory management: This may be of interest for Julia runtime developers or even all community.


I wonder why you think this. The blog posts seems to be a recap of the history of memory management, a call for a better solution and collaboration, then a vague hint that something like that will follow:

We don’t have a solution today, but my work on a solution leads me to believe one is probably within reach. However, there are very few people working on this. It’s not one of the trendy problems that are attracting lots of work right now. We need more people focused on the problem and exploring many possible solutions. If you want to see an alternative to garbage collection, I encourage you to lend a hand in creating it. Get involved by sharing your thoughts and ideas about it.

But nothing concrete.


Sounds like vaporware.


I know that there are programming languages being created everyday, each trying to solve different sets of problems, and each being constrained by the design choices they made to solve the problems.
That one seems to focus on the memory management issues, although I agree it seems to have nothing to show so far. Moreover, I have no idea if the author is able to offer anything about that.

I said that it may be of interest for Julia low-level development community, as Julia is a GCed language. But it may also have no interest at all. I don’t know.

It does seem like there could be some memory formatting cost for allocating, so if you could treat stray allocations like in-place for known repeating fixed-size objects when there is an old pre-allocated spot, maybe there’d be some benefit. It’d probably still need to sweep to know what it can overwrite though

I’d imagine a reserved buffer/space of 1000 int64 and 1000 float64 would cover a majority of local function variable allocations that make it to the main ram

A hack or kludge is a solution that works but is inefficient, inelegant and hard to maintain.

Since garbage collection is efficient, elegant and easy to maintain, the title of the post seems a bit questionable to me. But of course, elegance is subjective.

Rather than finding a way to manage memory without errors correctly, we just pawned the problem off on the computer.

Yup, that’s how you solve tedious, error-prone problems :grinning:

Java has given garbage collection a bad reputation because Java generates a lot of garbage so the GC needs to be really impressive to keep up. This is largely because Java has only mutable user-defined types and passes all objects by pointers, making it quite hard to avoid heap allocation of even very small objects. C# alleviates this problem by having both reference and value types, so you hear a lot less about GC issues in C#. We don’t really have much trouble with GC in Julia. Immutable user-defined objects help a lot, as do good APIs for pre-allocation and mutation. Of course, if one wants to write low latency code that’s a significant problem still.


I completely agree with your response to Walker’s idiotic statement about “pawning off” the memory management problem on the computer.

We could go further – “Rather than finding a way to write machine language without errors correctly, we just pawned the problem off on the computer.” Compilers are a hack!


You could just treat RAM like a giant ring-buffer and let the overwrites fall where they may, given enough ram…
A more advanced version of this might work quite well though, check if the current spot is free and large enough, if not take a step and try again

1 Like

Is our community developing double standard on politeness?


Agree, calling his statements “idiotic” is out of line. Please do be respectful even of people not in this community—we haven’t seen what Walker has come up with yet. Perhaps it’s brilliant and will make us all forget about garbage collection. However, I find that when someone has an even better idea, they don’t need to trash the quality of earlier good ideas, which makes me skeptical of his position sight unseen. Garbage collection is a great idea, which doesn’t mean that there aren’t even better ones to be had.