That being said, some projects are legitimately OK with some memory management errors and/or races creeping into production, in exchange for a lower learning curve in that area. If this describes your project, and you're happy with C++, then keep using C++.
(Note that I don't believe that "I write modern C++ so I never make memory management errors" is virtually ever true. Every large C++ app I've ever seen has fallen to some memory error or another. I think "I don't care (enough) about the errors" is a legitimate reason to use C++, but "I don't have to care" isn't.)
I very much agree. Although few people would say "I don't care about the errors", out loud, even if that sentiment is valid in certain contexts.
In that light, I have a question for you: What other concurrency features does Rust offer over C++ outside of data race freedom guarantees?
Rust has a few libraries that enable stack-scoped threads that are safe by virtue of ensuring that all threads created in the scope terminate before the data they reference is dropped (EDIT: and by preventing mutation of shared state without guarantees about atomic operations).
For example, I'm working on a project that uses crossbeam:
https://aturon.github.io/crossbeam-doc/crossbeam/
And there's a good blog post explaining some other things the library does:
It does in the same sense that it's safe to do anything in C++. Virtually nothing in C++ is safe, but you can pretty easily do it.
Just because you don't have to be explicit about it doesn't mean you don't need to have some mechanism to handle it somewhere, its just automatic instead.
I would say that the biggest win of Rust, once you get past the data race freedom, is that Rust's overall design puts the CSP model front and center like Erlang and Go do, while C++ is built on mutexes, locks, and futures. The way to get started with concurrent programming in Rust is thread::spawn, Sender, and Receiver, which will take you far. But C++ doesn't even have channels in the standard library; it encourages you to dive headfirst into shared memory, which makes simple concurrency needlessly difficult.
Rust doesn't restrict you from using shared memory when you need to (and verifies that it's safe when you do). But Rust's libraries and ecosystem encourage you to design your apps in shared-nothing fashion first, and only to introduce memory sharing when you need it for performance. That's a much friendlier way to deal with concurrency than mutexes, locks, and futures.
(I'm not sure how active that is worked on, though, I think I've seen basically the same version back in September.)
Which C++ subset should someone choose? All of it? What about the people who don't use exceptions? What about the people who don't use templates?
It's the same problem as writing a Perl to XXXX tutorial. The surface area of the source language is so huge that it's just not worth the undertaking.
Easy. The subset outlined in Effective Modern C++
> What about the people who don't use exceptions?
Rust doesn't have exceptions.
> What about the people who don't use templates?
Rust doesn't have templates.
So, C++ does. You asked about a tutorial for idiomatic Rust coming from C++, and then specified the full C++ set.
So, you have to give the Rust-y equivalents to exceptions, RAII, templates, reference types, virtual classes, etc.
Personally, I'd rather have a C to Rust equivalent--it's a lot easier. Especially a tutorial and primer on making Rust work in an embedded toolchain.
Being able to have a compiled, modern language actually work on embedded hardware would be excessively useful.
It's as if folks coming from C++ are supposed to "just get it". It's supposed to be "obvious" why Rust is a better choice than C++, yet I don't see it. Maybe if I was writing some sort of mission-critical software I would look into Rust. But I use C++ for cross-platform mobile applications. I've had trouble finding a compelling reason to invest my precious free time time in learning Rust over furthering my C++14 knowledge.