Hacker News new | ask | show | jobs
by plerpin 2236 days ago
Understanding the concepts is one thing, applying them is another thing entirely. The Rust compiler is an incredibly difficult beast to placate.
1 comments

Especially in prototyping you can mostly .clone() everything, and stop worrying about any lifetime problems.
Lots of deferred pain for when you productionize.
Yes, but this was on the topic of "is Rust suited for prototyping?", and I would say that cloning makes it much more suited, as it sidesteps a lot of the lifetime pains. You will have similar deferred pain if you e.g. prototype something in JS and then when it's time to move to production gradually move it to Typescript.

From personal experience of Rust projects in production, you can get by with cloning for a long time, and optimizing later is not too big of a pain in most cases. Performance problems due to excessive cloning are also very obvious in code and easy to profile for.