4 ms·
> the cognitive load of what I no longer had to worry about exceeded what I had to worry about. Yup, this has been my experience too. I started using Rust for
by cfallin 10y ago
> the cognitive load of what I no longer had to worry about exceeded what I had to worry about.
Yup, this has been my experience too. I started using Rust for my primary project last March and was worried a little at first about the risk of wasting too much time, but at this point I'm ~1.5x to 2x as productive as in C++11:
* essentially no more "head-scratching action-at-a-distance bugs" (I've spent N years in C++ and I still sometimes invalidate an iterator) -- as you say, any errors that still exist are higher-level logic errors, which are (in my experience) much more straightforward to track down.
* enums and match/destructuring and all the builtin types (e.g. Option, Result) have me thinking in a much more strongly-typed and principled way. So even logic errors tend to be less frequent because I break down the problem the 'right' way immediately. Algebraic datatypes let one describe a state space really succinctly.
Rust is one of those languages that really, strongly wants you to be idiomatic, but it pays off!