2 ms·
> refactoring is much easier and less frequently needed Compared to what? I have written about 10,000 lines of Rust so far... unfortunately, I stopped recently
by brabel 6y ago
> refactoring is much easier and less frequently needed
Compared to what? I have written about 10,000 lines of Rust so far... unfortunately, I stopped recently because I had a few huge refactors I had to make on one of my favourite projects which almost cost my sanity. The reason is that, in Rust, when you want to change the lifetime of a certain struct for example, you need to make sure that everywhere that's used it's only used in the new right lifetime... that turned out to be incredibly difficult to do and required heavy re-writing of many usages I had. Another huge refactor I had to struggle through was changing how I managed errors, and creating a new structure for my errors to be able to capture more information. Again, ran into huge issues which in a language with GC wouldn't exist. I still intend to go back to Rust as I do enjoy it even after all these issues I've had, but to claim Rust is easy to refactor strikes me as completely the opposite of the truth.
- axiosgunnar 6y agoYeah, I agree that error handling is not entirely on-par with the rest of the Rust developer-friendliness. I just use anyhow everywhere :D