5 ms·
Is life too short to fight Rust's borrow checker?
- cjg 4y agoPersonally, I would just use the first option, unless I had a specific reason otherwise.
- db48x 4y agoMost programs should be done in a garbage–collected language. Let the runtime deal with whatever you throw at it! Rust is for those cases where that would cost too much money, and you’re willing to pay the programmers to spend their time working out the memory allocation details so that that the computers don’t have to. Most of the time programmers are more expensive than computer run time, so the extra cost isn’t worth paying.
- cjg 4y agoA small performance improvement for avoiding GC isn't the reason I use Rust. For me, it's about (amongst other things): * correctness: e.g. no null pointers / segfaults, no data races, strong enums, error handling * docs: e.g. detailed API docs and amazing error messages * community: e.g. great interactions on GitHub issues
- db48x 4y agoYea, there are lots of reasons, but do note that you get all of the same safety and correctness benefits from most garbage–collected languages, such as Lisp, Javascript, Haskell, etc. Other languages do have a fair amount of catching up to do in the area of documentation and error messages though.