Gergely Orosz
๐ค SpeakerAppearances Over Time
Podcast Appearances
Yeah, and I guess there's also things like, can you forget to initialize a variable in Rust?
It doesn't allow you, right?
Yeah, and I guess the things with checking the format of incoming JSON, it also forces you to do that.
And again, yeah, so it helps you avoid errors.
And there's this thing which, again, I learned just very recently thanks to you as we're talking ahead of this, is the switch statement, right?
So in almost every language, you have a switch for an enum and you handle cases and then you might have a default or everything else.
And sometimes you forget one of them is not a big deal or maybe it's a big deal.
But in Rust, you cannot do that either, right?
I get a sense that the language designers have thought really hard of what are ways that typically go wrong in a lot of other programming languages, and they just try to fix it through the compiler.
The documentation example is the one where I'm still like, wow.
It happens all the time.
You have a comment, example or not, and then it gets out of sync, and we always complain about this, and we don't know how to fix it.
I know I've been complaining for a decade plus,
Rust is the first language where I hear an actual solution, even if it's not a perfect one.
And we've had the pitch from TypeScript or similar languages.
What about the pitch from C++?
Let's talk about memory safety.
And then an attacker who figures this out could populate something there, eventually get that code somehow executed or configuration read, and then boom.
That's a root user.