It imposes design constraints that in the end work out for the better. This is why Rust users are so fanatical about it.
It imposes design constraints that in the end work out for the better. This is why Rust users are so fanatical about it.
I feel the jury is still out on this. It does impose design constraints that remove a certain subclass of errors, whether this correlates to actually causing better designed programs in the sense of readability, maintainability, etc. I'm unsure. I understand the desire for this to be true and I feel that some of the fanaticism around the language is the belief that this is true. Developers like to have the 'one true way' to solve problems. Go's popularity I feel is in part because of this as well but achieved it by having a bare bones language with less options instead of a restrictive compiler. If you take the 'restrictive compiler' argument to its logical conclusion for a program that accepts input x and produces output y there would only be one valid way to code this program. This would be good in the sense that presumably the compiler has proven that your program works and is correct. On the other hand though I have no inclination to believe that this program would be the most understandable, modifiable way to get from x -> y.
What are some of those?
Looked it up, found these links, for anyone interested:
https://blog.regehr.org/archives/490
https://stackoverflow.com/questions/11276259/are-data-races-...
I'd also add that there are (small) warts on Rust's current implementation of borrow checking which everyone agrees are minor annoyances, even to experienced users:
https://github.com/rust-lang/rust/issues/43234
Judging by that issue thread, some of these issues are about to be fixed.