Productivity: Time spent writing code vs test/debug/fix?

100x this. Stable tokio/futures is a real pain. I'm excited about the async!/await! progress that is being made, but sadly haven't tried it myself.

The only thing I have spent more time with (and still failed to complete) was getting explicit lifetime borrows in structs working. It made a pervasive mess of &'a throughout my entire API, and ultimately ended up in self-referential struct territory. Where I determined it a failure and cut my losses. (I've since switched away from borrows entirely, and use Box only where absolutely necessary.)

But After learning Rust the hard way, I have really come to appreciate that it is suitable for most non-trivial applications. There are still a few ergonomic niceties coming down the pipeline that will make it even better. The Try trait comes to mind, which will allow the ? operator to work with types other than Result. All of these things really add up in terms of productivity.

I still find myself hitting road blocks frequently with borrowck. But having these kinds of errors caught early in development is such a freeing experience. The one thing I like to brag about with Rust development is that [if I can get it to compile] it has never crashed. Panics, yes, but I haven't ever had a need for tools like Valgrind to clean up my mess.

1 Like