Re:Rust RAII is better than the Haskell bracket pattern
by jstimpfle on Tuesday October 09, 2018 @08:01AM
(#18175174)
That's also a problem with garbage collection, by the way. GC means memory safety, but not necessarily correctness. In fact, it invites sloppiness, and a kind of sloppiness that sits at a more conceptual level, which could be harder to fix.
[ Parent
| on HN ]
Re:Rust RAII is better than the Haskell bracket pattern
by Ooveex2C on Tuesday October 09, 2018 @08:59AM
(#18175527)
At least in java the recommended way is to only use GC as safety net for resource management. Print a warning when it's cleaned up due to finalizers (or cleaner-refs since v9) and use scope-based cleaning instead where possible.