Re:Rust's Complexity Problem – A Warning
by whateveracct on Tuesday March 17, 2020 @05:54PM
(#22610888)
Thank you - this clears stuff up. I see now how lifetimes provide a tool to solve a very important class of problems.
I know Haskell is trying to get Linear Types for those purposes (with a paper + working ghc branch) but even those are going to take time to get nice imo.
Why does it usually leave you worse off? Because, since it's garbage collected, the language usually doesn't see the need to also provide a good way for the programmer to manage lifetimes, because, hey, we've got garbage collection, so why would they need to? The result is that the programmer has no help at all with the other resources.
So that's where I think the line is. Do you just have memory to worry about? Or do you have other resources as well?
And, to be clear: Yes, if you only have memory to worry about, garbage collection is fabulous. A whole set of problems just... goes away. It's very freeing.