3 ms·
Every GC is a trade off. You can't replace RAII with GC without losing some control. No matter how much you innovate in it, you have to pay with something. That
by shmerl 7y ago
Every GC is a trade off. You can't replace RAII with GC without losing some control. No matter how much you innovate in it, you have to pay with something. That's the whole point of GC after all.
Here is a good read about it: https://blog.plan99.net/modern-garbage-collection-911ef4f8bd8e https://blog.plan99.net/modern-garbage-collection-911ef4f8bd...
- pjmlp 7y agoGC enabled systems programing languages don't replace RAII with GC, they offer both and its up to the developer to make the best use of them.
- shmerl 7y agoIf the language works without GC, you can implement optional GC for it. Even Rust had something like that in the early days (though it was dropped). But languages where GC is expected by design, don't allow you to disable it (like Java).
- pjmlp 7y agoExcept I wasn't speaking about Java, rather D, Nim, Modula-3, Active Oberon, System C#, Swift.