If C and C++ are such great languages according to this board why are they so much more vulnerable to buffer overflow? Isn't Rust far less vulnerable to buffer overflow? Why learn C and C++ when rust is a thing? I personally am as it is useful for my field and understanding assembly, but for everyone else does it make sense? What other reasons justify learning C and C++ over Rust?
im gonna be honest im a zoomer please elaborate on what's said there
if you code in SPARK, it's impossible to code a wrong program
That's absolutely not what it means.
SPARK doesn't have undefined behavior, which means that it's theoretically possible to conduct a rigorous formal verification, which would let you verify that a given program acts according to a given formal specification.
This has nothing to do with right or wrong. Your program can have dead-wrong logic (e.g. using a wrong formula to calculate a missile's trajectory) and you'll only discover it with FV if you write the proper test.
Rust is a hobby project. C/C++ are professional tools.
If you want to do anything serious on Rust, you have to use unsafe, and as the docs say: "you are on your own, it makes Rust as vulnerable as the code you are importing"
Even if you stick with safe code, Rust code just isn't mature enough. I'm getting an endless amount of panics from allegedly production-ready libraries I'm using.
lmao
>Rust is a hobby project. C/C++ are professional tools
that must be why fortune 500 companies are starting to use Rust now too
>you have to use unsafe
you say this as if it's supposed to be forbidden, or illegal to use "unsafe". you don't seem to understand the point of having explicit unsafe blocks and are trying conflate it with the code being "bad", or somehow invalidates the entire language, which is absurd
>fortune 500 companies are starting to use Rust
They aren't. The Rust cult keeps a list whenever a company makes a passing comment of having written 1 line of Rust for one module, and then go on to pretend all the products are powered by Rust.
One good example is Dropbox which Rustaceans love to brag about using rust, yet you check their job offers and there's nothing for Rust, just Python/Go/C/C++/Java/JavaScript
>They aren't.
except, they are, why are you lying? I personally know someone who was hired at one specifically to use Rust on a new project with a new team of people.
Microsoft is even working on their own new language with similar concepts to Rust, to help create more secure and malware resistant software. you're just willfully ignorant, this is the future of software
>Microsoft is even working on their own new language
so....not rust? what a resounding endorsement of rust.
so if MS makes a clone of Rust with all of its core features, everyone's fine with using that, as long as it's not called Rust?
Important systems will continue using Ada not Rust. You use Rust when safety is nice to have but not a life-or-death requirement. Such as a browser.
that has way more to do with government and military specs requiring standards for every fricking tiny thing. it doesn't mean Rust is bad or unfit for any purpose. there is so much fricking red tape to do anything government related that private industry doesn't have to deal with
The Rust team doesn't have the capability to work on that level because it's a hobby project. That's why it has one lone compiler with over 7000 bugs (and growing), everyone uses the nightly version because anything slightly outdated is inadequate, no standard (let alone a safety standard), package manager has another 1000 bugs, they are swamped in bugs and can't keep up, and they keep ousting all the key people that made Rust (the lead dev, the Rust book guy)
>The Rust team doesn't have the capability to work on that level because it's a hobby project.
the bit about not using in military context because of not having secure coding standards has nothing to do with the language itself, or does it suggest it's somehow insecure, it LITERALLY means no one has sat down and put together a formal standard of recommendations for secure coding practices. the fact that no one has sat down and done this means they can't use it
it has absolutely nothing to do with Rust, or the people working on Rust. anyone could do this, just no one has bothered to do it.
with great power comes great responsibility.
just have a working brain and learn to avoid bad buffer manipulation.
what makes C/C++ more powerful than Rust?
Yes. Rust is the future. C/C++ stopped innovating so that's why Rust was created.
template<typename Type>
class Array
{
...
Type &operator[](int idx)
{
must(("out of bounds", idx < this->size));
return this->arr[idx];
}
}
there's more to programming than just avoiding buffer overflow. rust can't handle complex data structures without throwing unsafe {} around the entire program. there's a reason that the rust compiler is mostly written in C++.
>rust can't handle complex data structures without throwing unsafe {} around the entire program.
you've never written a line of rust in your entire life
explain this please whos right
the person who still has a dick