Live data from Hacker News

Criticizing the Rust Language, and Why C/C++ Will Never Die

viva64.com

41–50 of 89 posts

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#41
post #38

I left a comment on Reddit that I'll adapt here. It's really intended at the Rust community specifically, but I think the message is still worthwhile anyway: Not everyone is going to like Rust. That's totally okay. I've seen language communities, especially newer ones where people are particularly passionate, essentially turn into... this is a bit strong, but mini-cults. Where if you don't like the language, you're o…

Thanks for writing this, can't be upvoted enough!

You're welcome. I'm no perfect person either, but this is what I strive to be like these days.

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#42
post #22

Earlier quoted context omitted.

> "is a huge advantage over Rust for mission critical and safety critical areas" There's no C/C++. They are entirely different languages (even if C is supposed to be a subset). Not exactly suitable for mission critical systems. The fact that they are used for that is more due to the fact that they can interface with hardware at a fairly low level and the amount of engineers with C (and nowadays, C++) knowledge. The '…

> There's no C/C++. They are entirely different languages (even if C is supposed to be a subset). C++ is a subset of C, not the other way around. > the fact that they can interface with hardware at a fairly low level That's certainly one reason. Others include raw performance (think real-time safety-critical applications), no funny abstractions, tighter memory footprint, more flexibility, etc. > and the amount of eng…

Ok, i think it better to say that C and C++ share a subset of a language which is closer to C than C++.

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#43

Regarding speed, I am not sure it really is the bee's knees. The existence of LLVM and the likes, the fact that Javascript got a HUGE speedup in the past 5 years seems to be an indication that it is by essence a factor that can be tuned eventually. I doubt a "slow" language will ever get to be C in that regard, but I also doubt C will ever provide the kind of ease of mind that a more inherently modern and secure lang…

It is for the tasks that Rust is designed for. Rust is supposed to be a systems language; it is supposed to be the language used for writing web browsers etc, really performance critical stuff.

That was the whole big deal about Rust; that it's possible to get all of the nice functional stuff, the type safety etc yet still get fantastic performance.

You're meant to write your optimising Javascript VM in Rust, basically, your SSL library etc.

I'm not saying that Rust's performance is bad, or won't be good - and certainly that article convinces me of nothing. Nevertheless, if Rust were to be found to be only a little faster than Java for tight loops etc, that'd be disappointing.

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#44

It's true that C/C++ will never die. Not everyone loves them, but they're both good languages and they both have their place. Part of that place is due to mere tradition, mere established-ness, but part of it is real merit in terms of speed and directness. It's true that Rust aficionados tend to come across as religious zealots. Most "up and coming" language advocates do. This is a case where zealotry is understandab…

As someone who is gung-ho and hopeful about Rust, but an outsider, I would also like to see that measured, well-argued article.

I thought this article had some truth in it, but in general I'm always frustrated by the implication (which pops up from time to time) that languages with similar goals are mutually exclusive and newer ones must kill the older ones or themselves die. C++ is a great language which has been on a tear of improvement for the past decade or so, and suggesting that something will, or even should, kill it is silly. But it's just as silly to suggest that it is pointless to target the same goals as C++ while attempting to improve on some of its weaknesses.

I think it is likely that Rust will not be the rocket-ship of growth that Go has been, because while Go has attacked a niche by largely upending its ground rules, Rust merely provides some (arguably) better trade-offs within a fundamentally similar paradigm. A better comparison will perhaps be Scala and Java, and that's something to aspire to – Java isn't going anywhere, but there are lots of great things written in Scala and plenty of opportunities to use it professionally.

Certainly, it will be interesting to see where or if Rust finds its place in the types of large and enduring projects that it takes to really get a language off the ground. I think a particularly interesting area could be the ever-expanding database sector. It's clear (perhaps to the chagrin of many) that there is room for many different database products attacking different trade-offs, and they are often written in C++ (or C) for performance reasons, but have high bars for robustness and concurrency for which Rust really may be a boon.

I do think a lot of Rust's adoption will hinge on its performance story, and that was the argument in this article, and others along these lines, that is the most compelling. To be in the running for projects that would otherwise be written in C++ (like the database projects I mentioned), Rust will need to have credible and competitive benchmarks. I think it has made many good choices about the fundamental trade-offs that have a huge impact on efficiency (like defaulting to value types), but that it remains to be seen if pervasive safety comes at too large a cost.

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#45

I get that this is a translation but it's very poorly written even considering that. lots of repetitive conclusion jumping in what I can only assume is an attempt to baffle the reader into uncritically accepting what appears to be a largely unsupported opinion. the only evidence the post seems to offer is that rust is slow because it showed up 5th in a set of microbenchmarks. everything else is rhetorical garbage, fr…

At this point, the only response needed to "rust is slow" claims is - rustc is beta.

Come back when it's cooked :)

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#46
There's a real point hiding in the article, and not quite stated explicitly: If a language (call it X) exists and is widely used, because it's really useful for certain things, and another language (Y, say) comes along, then for Y to replace X, Y has to be significantly better than X at the things that X is good at. Otherwise Y gets viewed as "kind of interesting, but not worth the investment to make the jump", and languishes in obscurity.

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#47
It doesn't help that the only language they could think of to compare Rust to is D.

While D is alright it was never really slated to be the "next systems language" in the way Rust is being positioned.

The other part of the argument that comes across as really weak is criticism of Cargo. That would make sense if the alternative had better tooling. However if you have ever tried to assemble libraries and a decent build process for them in a large C++ project you would know that Cargo is almost like a gift from god.

Claiming that Rust is "simple" because it doesn't have inheritance is also a straw-man. Inheritance is far from the only means of polymorphism and it's presence has little bearing on the overall power of the language. In fact I would argue Rust's trait system is actually the more powerful of the two, but that is just my opinion.

Overall the author comes across as trying to find reasons to dislike Rust for the sake of disliking it, as if they feel threatened by it's very existence.

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#48

Earlier quoted context omitted.

C++ is impossible to validate formally. Rust inherently guarantees static memory safety in many situations, on the other hand.

Right, which is why a subset of C or C++ (like MISRA) is used for critical applications.

My day job is currently writing embedded high availability code to a slightly modified version of the JSF coding standard (which is itself a modified version of MISRA for C++). There's a lot of safety that Rust would give us on top of C++ with the coding standard's rules, and we're waiting for Rust to simply mature a little.

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#49
post #5
post #3

[deleted]

I've made an honest effort with C++ >= C++11. The language has improved -- lots -- but there's just no getting around the fact that: - Most of the improvements hellaciously leverage the hideous template system, and - Actually writing template-leveraging libraries is an exercise in pain, repetition, and insanely slow compile times. C++ won't be a "Rust-killer" (insert any other modern low-level type parameterized syst…

How does Rust's compile times compare with those of C++?

Re: Criticizing the Rust Language, and Why C/C++ Will Never Die

#50

Earlier quoted context omitted.

> C++ is a subset of C, not the other way around. I can't see how this statement could possibly be true. > no funny abstractions Really? Maybe I suck at C++, but I can't meaningfully reason about template-heavy code. Not about the run-time performance, nor resource consumption. STL and Boost are beyond funny if you ask me. > The formal standard defines what is undefined. Your safety-critical code shouldn't rely on so…

> But take a look at the specification and you'll be amazed on just how much stuff is left for the actual implementation to figure out. Which is why the coding standard for a critical project will disallow the use of things that can lead to undefined behavior.

[deleted]
Post reply on HN