3 ms·
> If you can use a GCd language like Go why would you go with Rust Memory leaks are possible in GCd languages and when they happens, sometimes you cannot fix t
by jraph 6y ago
> If you can use a GCd language like Go why would you go with Rust
Memory leaks are possible in GCd languages and when they happens, sometimes you cannot fix them easily / properly because of architectural problems. Thinking about the lifetime of an object can help with this.
We also still miss something in many languages that specifies whether we can modify or access an object after passing it as a argument to a call, which can can problems not related to memory safety.
(I've played with Rust but I don't practice it daily. I've also played with D but don't practice anymore. I don't know Go.)
- a3n 6y agoIs there a nice idiom name that represents ensuring that an object gets "released" and eligible for garbage collection?
- CraigJPerry 6y agoMemory leaks in Java are usually not so bad to fix. Maybe some off-heap scenarios could be trickier but IME people are pretty careful if they’re going to the extremes of off-heap. Memory leaks in enterprise java in my experience are usually things like forgetting to close a resource of some sort or maybe doing something silly like continually growing a set or map with duplicate objects because of faulty equals() or hashCode(). Both of these cases are well covered by static analysis. Maybe the trickiest but still relatively common scenario is a design issue where a weak reference is required - i guess that fits parent description pretty well.
- varjag 6y agoresource management
- deleted 6y ago[deleted]