garbage collection will almost certainly be a relic of the past surprisingly soon. Fundamentally it exchanges efficiency for readability & developer experience, to things that do not matter when using AI to write code.
Implementing efficient concurrent algorithms without a tracing collector is quite difficult, and it often requires the use of hazard pointers or epochs. Both act like mini collectors, and they also require special tuning.
Unless you want AI generated code to be single threaded and not take advantage of multiple cores, some form of collector is still required. If you want to avoid heap fragmentation issues, a compacting collector is generally recommended.
On the one hand, I agree with you; on the other, I also find reasonable that lower cognitive load may keep justifying the existence of GC-based languages even for AI.
Why would you think that malloc/free style memory management is more efficient? Both functions can be quite expensive, and they work synchronously. GCes give you compaction, compressed pointers, and bump pointer young generation operation as well as offloading allocation machinery to threads other than your business logic one. It's manual memory management that's going the way of the dinosaur, and the current interest in manual memory management is a fad.
Can't agree. GC language platforms are more efficient in many ways. Look at the hoops that C allocators try to jump through just to get decent THP coverage which a compacting GC gets essentially for free.
Disagree. Maybe the naive business app use case will, but there are plenty of places where you want to implement effective GC regardless. Anywhere you batch frees to avoid calling it in a hot path is a GC. So it's not _always_ an efficiency sacrifice. Or, a different perspective is you always have to ask "efficient with what resource?" CPU time efficiency vs memory efficiency for example (an interesting case where the _money efficiency_ has obviously moved severely in the past year!).
If true, it's sad. So much work and so much accumulated wisdom. It's like seeing a cathedral built by thousands of hands over dozens of years collapse in an earthquake.
Doesn't this assume infinite abundance of compute? For most problems, using a GC is probably easier for AI than to track everything manually(just like with humans). Similarly, we could probably ask AI to output everything in optimized assembler code, but it will almost certainly burn more tokens getting to a solution than if we allow it to write in python or some other HLL
No, manual memory management, with or without static ownership, is not inherently more efficient than GC. Bump pointer allocation is crazy fast. GC work is proportional to live data, not dead data. GC can do compaction and locality optimizations. Manual deallocation is proportional to dead data, unless you are doing bulk deallocation with regions. Stack allocation is crazy fast. It's a little beyond what state-of-the-art compilers do by default, but it's just pointer analysis that will also get better with AI optimizing and improving compilers.