by pfdietz · 7y ago · 0 comments
Perhaps that's a hard lesson to learn because it's obviously wrong.
Clearly GC has achieved a ton. However, I am starting to wonder whether it will hang on to that success, or whether new language designs that don't need it will gain a lot of ground back.
GC, in a way, seems like a shortcut to avoid reasoning about lifetimes, and sometimes taking that shortcut comes back to bite. If it becomes easy enough to get help from the compiler, maybe we just don't need GC any more?
Obviously far-fetched, but interesting to think about.
And yes, RC is a GC implementation algorithm as per CS reference papers and notable books.
C might never come close to any form of authomatic memory management, but in a couple of decades it will be relegated to surviving UNIX clone deployments.
C++ and managed languages have taken over everything else.
This is a GOOD THING. It's what using computers properly is all about. The idea that there's some sort of virtue in doing this reasoning manually just baffles me. It's like objecting to compilers because it's better if human string together the opcodes.
The problem with GC is that it's a runtime solution, which has all sorts of annoying problems (like interacting with other languages and runtimes).