3 ms·
> The GC made sense in comparison to C style memory management. But with with Swift, Rust and modern C++ the argument can be made that GC doesn't bring anything
by amelius 4y ago
> The GC made sense in comparison to C style memory management. But with with Swift, Rust and modern C++ the argument can be made that GC doesn't bring anything to the table.
Haskell needs a GC too. You can't do ergonomic functional programming without GC (it has been attempted).
- zozbot234 4y agoHaskell needs a GC because it can't figure out whether a closure might outlive any of the variables it references. This can be addressed by a Rust-like borrow checker. (In the rare general case where multiple independent pieces of code need to keep some object alive, this can be done via refcounting which of course is a kind of GC.)
- amelius 4y agoType based memory management has been done in FP languages. The point is that it completely breaks the experience.