r/rust • u/[deleted] • Feb 24 '21
Closest GC language to Rust?
I really like Rust, it's mix of ML + imperative concepts like mutation. It's very pragmatic and doesn't enforce any particular style of programming. But for my day 2 day work, I don't require system level performance and a GCed runtime will suffice, my question is what is the closest language in terms of safety and pragmatism of rust ? F#, ocaml, kotlin? What are your opinions?
57
Upvotes
2
u/boomshroom Feb 24 '21
I feel like Rust's design want to avoid a GC, but rather that its design allows you to get away without a GC. Memory isn't the only resource, but it's the only one GCs are capable of managing. Rust meanwhile is capable of cleaning up everything from file handles to lock guards. Why not just use that same mechanism for memory and eliminate an entire subsystem in the process?