3 ms·
> could something similar also work in C without taking away that minimalism? maybe automatic reference counting? [1] [1] https://en.wikipedia.org/wiki/Automa
by andrekandre 2y ago
> could something similar also work in C without taking away that minimalism?
maybe automatic reference counting? [1]
[1] https://en.wikipedia.org/wiki/Automatic_Reference_Counting https://en.wikipedia.org/wiki/Automatic_Reference_Counting
- indigoabstract 2y agoYeah, I remember about that. It works well for Objective-C. But since C doesn't have objects or messages, the best equivalent thing I can think of is for the C compiler to emit some type of signal on assignments and variables going out of scope. I don't claim to know what's the best solution for adding automatic memory management to C, but I'm pretty sure a good one exists. And it would need compiler support for it to work.