General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Anony Mousse
Low Level
comments
Comments by "Anony Mousse" (@anon_y_mousse) on "how can memory safe code STOP HACKERS?" video.
@АнтонГусев-н5ю You may have an incorrect definition of the word "can". In fact, an unknowledgeable programmer can still write bad code in any language, even Rust. What's more, those big projects have more than one developer, and the one introducing the bug may not be the maintainer and even in circumstances where they are they may be having a bad day. C makes it more of a concerted effort to write good code, but neither it nor Rust will force you to, regardless of any procedures you undertake. And there are static analyzers that can be used on projects written in C that will achieve everything the Rust compiler does and then some. Don't be lured in by the lies of the Rust developers, you can still very much write bad code in it, and code that has many errors. You can still write good code in C, just that no one is going to hold your hand.
2
The problem with calling Rust memory safe and C not is that the unsafe keyword exists. While Rust makes it more of an intentional decision, a knowledgeable programmer can still write code that is perfectly safe in C. On top of that is the fact that Rust is annoying to program in because of how explicit you need to be, it's like writing early C++ only it's lacking a lot of the features that made C++ fun back in the early aughts. Now with the standard library that C++ has and the massive array of language features, we'd be fools to cripple ourselves by using Rust for anything serious. Of course, C hasn't stood still in all that time and one of the features that I'm excited about them adding is #embed.
1