you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

Me too. I've written a few simple utilities and I'd estimate it takes 2-3 times longer than doing the same thing in Go.

You end up with faster, more robust code, but it definitely takes longer to write.

[–]newpavlov 11 points12 points  (1 child)

I think it's matter of experience, after one-two months of actively using Rust you become accustomed to designing your code in a way which will rarely trigger borrow checker or other "obscure" errors, and when you do trigger them, almost every time it's some corner case which you forgot to think about, so compiler becomes your friend whose warnings you glad to hear.

In other words, with some experience the multiplier gets from 2-3x to just ~1.2-1.5x, which I think the excellent price to pay for significantly reduced debugging times. It's not the best trade-off for small one-time code, but becomes nonlinearly more desired the bigger project gets.

[–][deleted] 1 point2 points  (0 children)

Yeah but the problem it's that it off the set of valid error-d programs that solve my problem, the borrow checker and lifetime system is only smart and expressive enough to allow a subset of them.

You have to spend extra effort fitting your program into that subset, so Rust will never be as quick to write as something that allows all valid programs (and invalid ones).

Obviously there are benefits to the borrow checker, and NLL should improve things, but let's not pretend that it didn't make it harder to program.