2026-10-06 11:55 UTC
The whole point of it is to prevent you from doing stupid shit. Yes it’s annoying. But you can’t handle memory management on your own, no matter how much you think you can.
It’s either that or garbage collection. Choose which one you hate less.
Replies (3)
-
@panda_abyss@lemmy.ca 2026-10-06 12:25
I mean, I really like the zig approach. It usually turns into “the caller is responsible for managing the memory” But then when I’m the caller I sweat a little.
-
@ZILtoid1991@lemmy.world 2026-10-06 12:51
Police fans say the same thing about the police.
-
@tias@discuss.tchncs.de 2026-10-06 13:13
Garbage collection doesn’t solve the problem either, cause it’s too unpredictable and typically doesn’t even give you the option to close resources when memory is reclaimed. So just opening SQL connections and forgetting to close them will quickly drain the connection pool.