(un)popular opinion: Yes, #Rust is great, but most applications are totally fine with a GC allocation model.
The langauge is optimized for more system-critical applications than most of its users are working in.
A literal fork of rust that introduces a good GC would kind of hit a sweet spot for a lot of applications.
Algebraic data types, typeclasses (aka traits), functional programming at the fingertips, strict evaluation.
@holger Rust has solved the memory management in such an elegant way that I don't understand what you would gain from introducing a garbage collector.
@holger Hm...interesting idea, but I'm not quite convinced. Even if it wasn't for performance reasons that #Rust has no GC, it's unique ownership model makes it very clear where *resources in general* are allocated and freed. Think of resources not only memory related, but also:
- file handles
- database connections
All of these resources are automatically handled (e.g. closed, freed etc), when it goes out of scope.
So Rust's complex rules are there for a reason. A GC would not change that, IMO.
chaos.social – a Fediverse instance for & by the Chaos community