Re:My negative views on Rust
by DarkCrusader2 on Thursday December 23, 2021 @03:08AM
(#29659734)
Agree 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.
What 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).
Re:My negative views on Rust
by alice-i-cecile on Thursday December 23, 2021 @02:53AM
(#29659640)
Honestly, 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.
Re:My negative views on Rust
by lewantmontreal on Thursday December 23, 2021 @03:07AM
(#29659731)
Is GC for Rust possible in the future? I’d love that if it means simpler compiler error messages for e.g. closures.
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.