5 ms·
A good bit of "legacy" C++ features are used in a number of applications that articles lists as "mission critical" perfectly well, too. Some of the arguments al
by sidlls 10y ago
A good bit of "legacy" C++ features are used in a number of applications that articles lists as "mission critical" perfectly well, too. Some of the arguments along memory safety, to my eyes, appear to be bordering on the hysterical. There are many legitimate criticisms of C++ ("legacy" or "modern"), including some related to memory management and safety. That hasn't impeded its use (its safe use) in a number of applications.
As a long-time user of C++, I find Rust to be more appealing in many ways. I don't think "C++ is dangerous" is a good approach to advertising Rust to the C++ community.
- pjmlp 10y agoI agree, those of us that care about safety have moved to other languages and only come back to C++ when we need the features C++ excels at. A good way to see what C++ community cares about, in order to make Rust appealing to them, is to see the work from SG14 (games and HPC) on ANSI C++. That is the type of crowd that Rust should target, and they care about performance without belts above all.
- sidlls 10y agoI care about safety and recognize that I can achieve it in C++. These claims that it's not possible, prohibitively difficult and so on are basically unsupported assertions. They're exactly the kind of argument that people who would like to see Rust gain traction shouldn't be making, because they impugn the credibility of the person making them.
- pjmlp 10y agoI can also achieve it in C++, and do it on my personal projects. Working with teams on typical enterprise environments is another total different story. Just last week I had to do an acceptance review of a C# application for a customer, I surely wouldn't want those devs touching C++ as well.
- quicknir 10y agoThe over emphasis on memory safety makes for a very weak pitch. I only spend a tiny fraction of my time on memory related issues. Most bugs are simply not memory related. If you're writing Firefox or SSL, a memory mistake may be a vulnerability and a serious issue. In games, hpc, hft, etc, a memory mistake is almost always just another bug. Would be great instead to see more examples of how e.g. destructive move in That allows generating better assembly.
- steveklabnik 10y ago> Would be great instead to see more examples of how e.g. destructive move in That allows generating better assembly. One example isn't about the destructive aspect: a move in Rust is always a memcpy. Since there's no move constructors, there's no way to run arbitrary code, so it's always a memcpy. The optimizer can also then elide this copy if it isn't actually needed.
- quicknir 10y agoYes that's what I was referring to, the terminology I used has been used before in C++. Rust s moves are considered destructive in the sense that the old object is no longer functional, which of course is fine because it can't be used.
- steveklabnik 10y agoOh yeah sorry, I see what you're saying now.
- pjmlp 10y agoIn games a memory mistake is yet another way of loosing sales of a game, create bots to win network matches, work around in-game sales of items, ... In HPC a memory mistake is yet another way of producing corrupt results for writing that paper, that after all is wrong. In HFT a memory mistake is yet another way of producing corrupt values, leading to the automated trading bot selling items way lower than they should have been, loosing millions in the process.