On 3/3/14 11:00 PM, Nathan Myers wrote:
My concern is that the examples presented in tutorials must be
compelling to skilled C++ programmers.  If we fail to win them over, the
whole project will have been a waste of time.  The most skilled
C++ programmers know all too well what mistakes show up over and
over again.  They have lots of experience with proposed solutions
that fail.

The trouble with trying to show that modern C++ is not memory-safe is that "modern C++" is very ill-defined. Because references are not memory-safe--they can go dangling, and so forth--it is easy for a C++ programmer to argue "well, you didn't use references right" when a memory safety problem is demonstrated. The issue is that it is impossible to write an automated (or manual) prover to ensure that C++ references aren't misused without essentially replicating Rust's infrastructure, but spending enough time in a tutorial to prove to a dedicated C++ user that yes, C++ is not memory safe would be a huge inappropriate distraction for a tutorial.

I would rather just have users reading the tutorial have to trust that we know what we are talking about, and not try to compare against C++ directly. Other people can write blog posts and such showing how Rust prevents memory safety problems in C++ if they would like to.

C++ is mature enough now that some are looking for the language
that can pick up where C++ leaves off.  They wonder if Rust might
become that language. (It manifestly is not that language yet.)
They are who will need to initiate new, important projects that
risk using it, and they are who will explain what it doesn't do
well enough yet, and how to fix it -- but only if we can keep
their already heavily-oversubscribed interest in the first 30
minutes.

As I said above, in general, in 30 minutes it's impossible to prove to a C++ user who believes that references are memory-safe that they aren't. Even if it were, spending 30 minutes on that would be a diversion and out of scope of a tutorial.

Patrick

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to