4 ms·
> Just making borrow checker violations into warnings for debug builds would go a long way to making the language more tolerable to the overwhelming majority of
by ModernMech 5y ago
> Just making borrow checker violations into warnings for debug builds would go a long way to making the language more tolerable to the overwhelming majority of programmers not already committed to it.
I hope Rust never does this, as I think it would kill the best thing about the language. There's almost no point in using Rust if you're not interested in leveraging the borrow checker to write safer code. Just write C++ instead.
The last thing the Rust community needs is to be flooded by new users who don't bring with them a culture of writing safe code. If you give users the ability to just turn off the borrow checker, they'll leave it off and ship code in debug mode.
Many users find the borrow checker perplexing only because they can't understand why the code they write day in and day out in other languages gets rejected by Rust. Well the answer is likely because it's unsafe in some subtle way, and the borrow checker caught it before you even had an inkling there was an issue. Best to get used to writing safer, well-architected systems first, and then you'll have an easier time satisfying the borrow checker.
- pjmlp 5y agoVisual C++ development experience with background live static analysis is slowly approaching Rust like, and that is the team's goal. It just needs to be good enough for people not bothering to change.
- ncmncm 5y agoEither Rust gets this, or almost everybody who might otherwise have coded Rust, someday, will be obliged to "write C++ instead". Or something. Letting your favorite language fizzle because you want to force everybody else's implementation schedule to match your biases is a peculiar choice. I don't mind, personally, if Rust fizzles, but it seems like you ought to care.