4 ms·
> Hm, why would you not use multiple ownership then, instead? That's exactly what I want. The problem is that (1) it comes with significant runtime overhead an
by rbehrends 10y ago
> Hm, why would you not use multiple ownership then, instead?
That's exactly what I want. The problem is that (1) it comes with significant runtime overhead and/or syntactic noise in Rust/C++ (or alternatively, lack of memory safety); and (2), it becomes difficult to write code that works equally well for multiple and exclusive ownership (module APIs often become burdened with implicit or explicit ownership assumptions).
- steveklabnik 10y agoGotcha. I'm not sure I agree, but I understand :)
- rbehrends 10y agoWell, let me also add that I completely understand that there are use cases for Rust, where a GCed language would be a poor fit. An obvious example is a web browser ( :) ), where the x% memory overhead that comes with a garbage collector is just a price that you may not be able to afford to pay. In other words, don't read this as "Rust sucks" (I actually rather admire Rust's design), read it as: for my purposes, the practical use cases of Rust are generally too niche to justify the software engineering tradeoffs.
- steveklabnik 10y agoYeah, I hear you. I think this is fair. And at least some of it comes down to preference, that is, I don't think that the syntactic noise is very much, but others can certainly disagree. The others would mostly be a "nuh uh" since I don't have numbers anyway :) At the end of the day, Rust can never be great for every single last programmer, and this is entirely okay.