C++17

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 27 07:14:07 PST 2016


On Wednesday, 27 January 2016 at 08:08:30 UTC, Tobias Müller 
wrote:

> If you want to attract new programmers you should stop 
> constantly bashing other programming languages on the public 
> forums.
>
> This is one thing that Rust got right.
>
> Tobi

I know I should just let this go, because time is valuable, but 
anyway...

All language comparisons involve "bashing" other languages. 
Otherwise there is no answer when someone asks "Why language X 
rather than language Y?"

Forget about random posters on a forum. Let's go to the Rust 
homepage, click the link https://github.com/ctjhoa/rust-learning 
and then click on Why Rust? 
http://www.oreilly.com/programming/free/files/why-rust.pdf

That's not a random forum post. It's a document promoting Rust, 
linked on the Rust homepage, and produced by O'Reilly. Here are a 
few quotes:

"It’s difficult to write secure code. It’s common for security 
exploits to leverage bugs in the way C and C++ programs handle 
memory, and it has been so at least since the Morris virus, the 
first Internet virus to be carefully analyzed, took advantage of 
a buffer overflow bug to propagate itself from one machine to
the next in 1988."

"It’s very difficult to write multithreaded code, which is the 
only way to exploit the abilities of modern machines. Each new 
generation of hardware brings us, instead of faster processors, 
more of them; now even midrange mobile devices have multiple 
cores. Taking advantage of this entails writing multithreaded
code, but even experienced programmers approach that task with 
caution: concurrency introduces broad new classes of bugs, and 
can make ordinary bugs much harder to reproduce."

"In allowing an array reference to affect the behavior of a 
subsequent return statement, my C compiler is fully 
standards-compliant. An “undefined” operation doesn’t just 
produce an unspecified result: it is allowed to cause the program 
to do anything at all."

And ironically, in this very thread, a C++ programmer has called 
D a toy language.




More information about the Digitalmars-d mailing list