▲ | zozbot234 2 days ago | |||||||||||||||||||
> So far I've always succeeded without using "unsafe" or indices, but it drags down productivity. There is a common perception that Rust is less productive than competing languages, but empirical research by Google and others has found this to be wrong. Rust just shifts the effort earlier in the development phase, where the costs are often orders of magnitude lower. You may spend a few hours struggling with the borrow checker, but that saves you countless days of debugging highly non-trivial defects, especially in a larger codebase. > Although object-oriented programming is out of fashion, classes with inheritance are useful. It's really hard to do something comparable in Rust. Traits are not that helpful for this. FWIW, "classes with inheritance" in Rust can be very elegantly modeled with generic typestate. (Traits are used as part of this pattern, but are not the full story.) It might look clunky at first glance, but it accurately reflects the underlying semantics. | ||||||||||||||||||||
▲ | lelanthran 2 days ago | parent | next [-] | |||||||||||||||||||
> Rust just shifts the effort earlier in the development phase, where the costs are often orders of magnitude lower. That works fantastically when you're rewriting something - you already have the idea and final product nailed down. It works poorly when you don't have everything nailed down and might switch a lot of stuff around, or remove stuff that isn't needed, etc. | ||||||||||||||||||||
| ||||||||||||||||||||
▲ | Hendrikto 2 days ago | parent | prev | next [-] | |||||||||||||||||||
> Rust just shifts the effort earlier in the development phase […]. You may spend a few hours struggling with the borrow checker. And by the time you got it figured out, the requirements change, and you’re back to struggling with the borrow checker. > that saves you countless days of debugging highly non-trivial defects, especially in a larger codebase. Seems like many projects never get to the point where the architecture toil pays off. Instead, they spend 80–90% of their time trying to find the perfect architecture, which is then brittle against change. | ||||||||||||||||||||
▲ | krater23 2 days ago | parent | prev | next [-] | |||||||||||||||||||
> You may spend a few hours struggling with the borrow checker, but that saves you countless days of debugging highly non-trivial defects, especially in a larger codebase. How often do you had issues like that in the last 10 years of your work? Questionable if it's really cheaper for everyone. Other question, is there any really large Rust codebase out there thats older than 10 years? That had time to gather crust of tons of developers to compare with the appropriate C++ codebases? I don't think so. | ||||||||||||||||||||
▲ | UltraSane 2 days ago | parent | prev [-] | |||||||||||||||||||
The biggest issue with Rust that I have found is that there are phase changes where making small changes to the code becomes impossible and you must completely redesign the program for it to work with the borrow checker. |