3 ms·
>Not having a GC and not freeing memory by hand is one of the features that makes Rust special. What would be the point of this? To put it bluntly: to make wri
by vegai_ 5y ago
>Not having a GC and not freeing memory by hand is one of the features that makes Rust special. What would be the point of this?
To put it bluntly: to make writing Rust fast and fun. If you think it's fast and fun right now, you're either very good at it or somehow delusional.
- lewantmontreal 5y agoIs GC for Rust possible in the future? I’d love that if it means simpler compiler error messages for e.g. closures.
- alice-i-cecile 5y agoHonestly, if you're working within a well-architected framework, writing Rust is genuinely a joy (except perhaps async). The painful challenges of "how do I design something that plays nice with the borrow checker" can be solved once, and then you just stick to convention and enjoy the expressiveness of the trait system.
- duped 5y agoWhat would garbage collection buy you in a language like Rust?
- DarkCrusader2 5y agoAgree with this. I wrote some non-trivial amount of code in Rust just to give is a proper try. After countless hours spent in understanding borrow checker, life times and waiting for compilation to finish, I still have to constantly fight borrow checker. When working with Rust, I am not "making thing X" but instead "writing Rust which happens to be X". The code is littered with either `unwrap` of `?` which is just exception management done manually with hardly any benefit. On systems programming front, last time I checked there were two options to make system calls (apart from writing inline assembly), the `libc` or the `nix` crate. `libc` is just a wrapper so exposes `unsafe` C like API which doesn't make for idiomatic Rust code. `nix` was incomplete on lots of front, not sure if things have changed now since it has been a while I tried Rust. So much for a systems programming language.
- timeon 5y agoWhat is wrong with `?`? I consider Option<T> as a plus. Unwrap is hack but '?' is good error handling. Better then littered code with unnecessary ifs (which you need to use even in GC languages).