3 ms·
While there are other benefits to the borrow checker, the main one is safe memory management and GC languages get you that much while allowing for faster develo
by throwaway894345 4y ago
While there are other benefits to the borrow checker, the main one is safe memory management and GC languages get you that much while allowing for faster development.
- pdimitar 4y agoCan't disagree with you at all, even though I want to. I love Rust and I hate having to emulate enums in Golang but the speed of development becomes more and more a deal-breaker the more time I spend with Rust. I might just settle at OCaml, if at all possible. Or, since this is the real life and there are no simple final solutions, I'll likely just become a master of all three. But really, as much as I appreciate Rust for being super strict, I also don't think strict lifetime management is as important for many tasks (though it's a life-saver for some).
- throwaway894345 4y agoYeah, I 100% agree with hating emulating enums in Go (particularly because there is no safe way to emulate exhaustiveness checks). Personally I haven’t found Ocaml to be any more productive (inadequate libraries, poor tooling, constant futzing with multiple std libraries), but maybe I didn’t commit to it for long enough? That said, I’m starting to do a bit more systems development so I’m excited to dabble a bit more in Rust.
- bsaul 4y agogc is about memory disposal. IMHO the main purpose of the borrow checker is to ensure proper concurrent memory access, while the memory is still in use. Which gc don't help at all..
- throwaway894345 4y agoI don’t think the main purpose is concurrent memory access considering the enormous share of memory managed by the borrow checker which is never accessed in a concurrent context. Whichever purpose is the “main” purpose hardly matters anyway—the fact of the matter is that Rust makes memory management quite burdensome even though it makes it easier to ensure certain correctness properties.