4 ms·
> Rust seems to put a lot of difficulty up front I've found myself thinking, time and again, is Rust exposing, to the programmer, what have traditionally been
by jjtheblunt 4y ago
> Rust seems to put a lot of difficulty up front
I've found myself thinking, time and again, is Rust exposing, to the programmer, what have traditionally been details handled to varying degrees by sophisticated compiler optimizations? If so, a great optimizing compiler might deliver binaries as performant as a Rust expert could, but with less programmer effort?
(I can't answer that, only haven't found a counterexample as a one time optimizing parallelizing compiler person.)
- oconnor663 4y agoIn my experience, the details Rust is exposing are less about performance and more about correctness. For example, Rust forces you to be explicit about: - who owns what - how long things live - which values might be null or missing - which functions might return errors - how strings are encoded (https://twitter.com/timClicks/status/1450943515635056648 https://twitter.com/timClicks/status/1450943515635056648) - which types are thread-safe There are some performance gains to be had in that list, but for the most part it's about asking the programmer to be explicit and avoiding convenient-but-risky defaults that lead to lots of bugs.