>>105718895>might as well use GCah, yes, let's add computational complexity to software that does not need it 95% of the time.
you know where GC is most helpful? graphs. do you know where my graphs live? in the database. you know what the database does? handles GC.
>consider Haskellok, so I implement a basic VM for customers to write configurations for their instances of my software. this VM is a thin wrapper over the host language (Haskell in this case), and mainly uses the host language's data structures.
anyway, the customer decides to do some weird shit like storing hash maps inside of hash maps as values. some of these internal hash maps are based on one another, with only slight differences. because Haskell uses immutable data structures, and is a smart little bugger that wants to avoid unecessary consumption of memory, only these differences really add to memory consumption.
anyway. I end up saving the outer hash map in a serialized form to the database at some point, and later it gets reloaded. all of a sudden, my memory consumption has gone up by 3,000% because Haskell lost its knowledge of those internal hash maps only having slight differences, and now I have many near duplicates of the same hash map over and over and over again.
now, the machine crashes under the new load, and we have a very significant bug on our hands. now, you are talking to Chat GPT about implementation of a diffing algorithm for hacking together a solution that attempts to recreated the data structures in a manner where Haskell is able to be smart about this shit again. your deserialization process eventually takes 5,000% longer than it previously did, and it took a month of work to get this customer's shit back online.