4 ms·
I have just a couple of points. First, please be careful with the "experts" broad brush. Not all, and possibly not most, experts will agree on many things. Mor
by sidlls 10y ago
I have just a couple of points.
First, please be careful with the "experts" broad brush. Not all, and possibly not most, experts will agree on many things. Moreover, actual experts will understand that there are pros and cons that are context dependent. I would hesitate to label as "expert" anybody who categorically prefers one over the other for all cases. That's more like zealotry than expertise.
Second, for my part the biggest hurtles are in two parts. One is that at the boundaries of speed versus provable safety. At some point I don't need and can't afford the cycles added by boundary checks and other Rust guarantees, and the mechanisms provided to mitigate them are as cumbersome as writing (unprovably) safe C++ code (e.g. "const&", "std::move" and other similar constructs) compared with the equivalent Rust. The other is a more a branding problem: gratuitous maligning of C++ is problematic, and projects a sort of arrogance that I find subjectively distasteful.
- steveklabnik 10y agoMost of Rust's guarantees are provided at compile time and have no overhead, just to be clear.
- sidlls 10y agoYes most, but not all.
- Yoric 10y agoOut of curiosity, have you hit examples in which the runtime cost of Rust's safety was problematic – and couldn't be worked around without losing either safety or clarity?
- UtherII 10y agoThe most obvious case is bound checking. If you have a code with direct array indexing you have to use unsafe code or loose a little bit of performance.
- dbaupp 10y agoThe Rust team puts a lot of effort into not gratuitously maligning anything, including a "competitor" language like C++: discussions of other languages try to be as factual as possible, and, Rust is very happy to adopt the good ideas of them (and of course acknowledge this), e.g. Rust's closures are modeled after C++11's lambdas. As with anything, some people who like Rust might get a bit enthusiastic about discussing its benefits compared to other languages, but this is frowned upon and IME usually called out, especially in spaces with some sort of "official" Rust moderation presence.
- shermanyo 10y ago> The Rust team puts a lot of effort into not gratuitously maligning anything Anecdotally, Rust developers are the only group I've interacted with that consistently focus on the positives of other languages when discussing different features or concepts, while acknowledging the tradeoffs and clearly outlining the reasoning behind Rust's choice.