I'm not sure there's much to take away from this article. The author spends most of his words arguing against himself and then ends with a very confusing paragraph with a vague call to "understand what security means", a reference to "the growing movement toward legislation" (what legislation?), and the implication that we might be less secure, somehow. Maybe there is some subtext I'm supposed to know before reading,…
I can speak to the “legislation” bit. The federal government is starting to take a position that “memory safety is good.” A few recommendations have come out of a few security-adjacent portions of the government, and this has caused quite a stir in at least the C++ community. Right now it’s more along the lines of “prefer a memory safe language over a memory unsafe language if possible” but some fear(/ others hope?)…
Why the case for Rust is not particularly compelling
31–40 of 45 posts
Re: Why the case for Rust is not particularly compelling
#32Re: Why the case for Rust is not particularly compelling
#33Eh. Much current C code is somewhat safe-ish because of Herculean efforts to not screw it up. If the author can use “C” to mean “C or C++” (WTF) then I’m going to use “Rust” to mean “any language designed to make it easier to write correct code”. Rust’s memory handling removes so many footguns like use-after-free that whole classes of exploits evaporate. Then it adds a type system that makes it hard to write whole cl…
Came here to post this but you beat me to it.
We have reasonably safe C/C++ code in some places because of a combination of a huge amount of extra effort to be careful plus years of prior bug fixing and rewriting of that code to use safer practices.
Re: Why the case for Rust is not particularly compelling
#34> hyper-rational
You don't exactly call internet fandoms "rational" in any perspective. They're simply irresponsible for what they're saying. They simply don't care about your situation.
To add an anecdotal note, Rust sucks in its own ways. No single idea is good enough to be enforced in every single context. For example, Rust makes it harder to write simple mundane logic, which languages like Python and JS could express concisely. You're still stuck with verbosity like chaining dances and long type signatures, even when they hardly matter. A full-blown bureaucracy you must overcome every single day. This puts Rust in the realm of Java, which used to enforce pure OOP.
Re: Why the case for Rust is not particularly compelling
#35I guess there could be more vocal zealots in the Rust Evangelism Strikeforce, but as a member myself I strongly disagree with the premise of the article. Rust is currently the only mainstream option for memory safe development with a focus on performant systems development. The latter emphasis being the primary motivator of people using C/++ in the first place. If you aren't particularly concerned about systems devel…
I don't like the article either, but this is just as bad. It's using hyperbole to counter hyperbole. Of course there are some safe programs in the world of C. It's ridiculous to say that there doesn't exist even one program which is safe.
Re: Why the case for Rust is not particularly compelling
#36>In programmer world, you really can’t beat this argument. Because programmers are hyper-rational. This may be one of the biggest lies I've ever seen on the internet
This whole post has a very hyperbolic feel to it that hurts whatever substance there might be to the argument.
Re: Why the case for Rust is not particularly compelling
#37Earlier quoted context omitted.
This is a great summary-by-quote, I feel fully informed about what to expect if I actually would read the full source text, and based on this excellent summary I am confident I can save reading it for when I've run out of things argue about.
Would you say I'm being irrational by plucking this one quote out of the post?
Re: Why the case for Rust is not particularly compelling
#38and in comparison to languages like Python it lets you efficiently refactor code on larger scale by having types
and in difference to Java you don't have to worry about all the complications and optional parameter Java brings with it when deploying it
rust isn't so successful by being the best, it is by having a different set of issue then some of the other established solutions
---
> Because programmers are hyper-rational.
no not at all, they love to claim so, but we are humans and the very huge majority of humans things first emotional (including here the "feeling" experience gives you) then rational in various ratios, including most people which claim they don't do so in my experience
> “What the fuck are we doing in the cases where there are no vunerabilities?”.
I would argue for C++ this is basically close to never the case. Else memory issues wouldn't be such a huge deal even for companies which teams mostly consists for majorly above average programmers.
But outside of a few exceptions most companies have teams including average and below average skilled members.
But the issue with especially C++ but also C is that it's really easy for someone who is not yet an expert to produce code which passes tests but has subtle easy to overlook UB which depending on how the compiler happens to optimize might be a security vulnerability and the status weather it is or not can even change over time without changing the bad code. Not just by changing the compiler but also by changing other code around it.
So IMHO this means that from a business POV it's only reasonable to use C++ if your teams exclusively consists of only the best most disciplined programmers (and they definitely never get idk. brain fog from COVID). Which means it's basically unusable as using it is too much of a unneeded risk. (There are always exceptions where this risk can be worth it, e.g. due to existing library only available in C++.)
For C things are a bit different and hope people stop lumping them together. It has much less of the hidden pitfall complexity which is perversely permeating C++. But due to the lack of abstraction code reuse can be quite a pain, and while overdoing code reuse is an issue, C is just too far behind in this aspect needing too many hacky solutions to allow you to be productive.
Nothing of this means you should use Rust, but independent of Rust using C and C++ for a new project is just a pretty terrible business decision for most companies in most situations. I mean think about it ignoring Rust and languages for which it's hard to find and/or onboard developers for many server use cases Java is a better choice then C++ (sure Java as a stickma but its really no longer that bad, and for some use cases even Python can be just fine, oh and Go), for phone apps Dart (easy to use/onboard, flexible enough) or Swift(iOs)/Java(Android), on windows C# (and sometimes also on Linux). Even TypeScript is quite often a better option then either C or C++ (TS has issues, but it can be surprisingly productive). However I look at it outside of some cases mainly related to existing libraries for most companies most of the time there is just no reason to use C++ or C as there are always better choices. In the few non "existing library related" cases where non of the above mentioned languages work well Rust most times is an very viable option with the major benefit that it's much more viable to accept contributions from people not very experienced in Rust then it's with C++.
So I understand if programmers which have specialized in C or C++ want to continue using it, and in turn companies might be forced to use it for employee sanctification.
I also understand that there are ton's of libraries which can save many hours of work available sometimes only are nicely usable by C++ and some other more niche cases.
But ignoring cases like that from a bussiness (not personal) POV using C++ or C is just a pretty bad decision.
And coming back to the question why some programs don't have memory related security vulnerabilities if you ask the question industry wide the answer is often: "Because it doesn't use C/C++ but the risk of it happening was reduced".
----
One think the author seems to allude to is that many programmers need better training, teaching approaches to handling programming etc. I agree. But I strongly, disagree that this "fixes" the issues C/C++ has. It's also not really viable as long as the IT industry is expanding as fast as it did in the last 20 years. There is also the issue with Computer Science and Software Development being two different things with some overlap. But many teaching industries handle that separation badly. I'm really wondering will that get better (less expanding software industry) or worse (ChatGPT and co. making it even harder to properly learn it). Anyway training needs to change.
Re: Why the case for Rust is not particularly compelling
#39Extremely weird and ahistorical. I wouldn't go so far as to say that everyone should use rust, but this argument is against a straw-man. Roughly speaking, it skips over the fact that 1. history has demonstrated that memory bugs are easy to produce and hard to find and 2. even a single memory error can be devastating in terms of data and money and productivity lost If Rust eliminated most or a large class of memory er…
Instead of saying everyone should use Rust I would say outside of a limited set of circumstances no one should use C/C++ for new projects, especially C++ given how much hidden complexity it has which you have to "magically" know.
But that "limited set of circumstances" is sadly not that small and people which specialized only in C and/or C++ probably and understandably don't want to hear that either.
Rust isn't the best it's not bad but it's quite mediocre tbh. (like most successful languages; coming from someone who has used rust in production since not long after the 1.0 release). I think the reason it is so successful is that it has a different set of drawbacks then many of the other alternatives. Add to that that it managed to gathered enough momentum to have enough libraries and other support and similar to use it productive in many situations and lastly it's general purpose from server, over desktop, phones to embedding as well as the web through wasm.
Re: Why the case for Rust is not particularly compelling
#40I guess there could be more vocal zealots in the Rust Evangelism Strikeforce, but as a member myself I strongly disagree with the premise of the article. Rust is currently the only mainstream option for memory safe development with a focus on performant systems development. The latter emphasis being the primary motivator of people using C/++ in the first place. If you aren't particularly concerned about systems devel…
> The claim that there are some safe programs in the world of C is categorically false. I don't like the article either, but this is just as bad. It's using hyperbole to counter hyperbole. Of course there are some safe programs in the world of C. It's ridiculous to say that there doesn't exist even one program which is safe.