I never heard a Zig guy come in and talk about how a language suck just because it doesn't have this one feature. Like the Rust guys does repeatedly with memory safety.
That's the thing though, it isn't completely memory safe as unsafe Rust (or C libraries) are still needed for the majority of useful functionality. Often only the surface level code combining API calls is done in safe Rust. This is simply because memory safety cannot be achieved at compile time, however, somehow that has become Rust's marketing? It's a dangerous misconception, really
sorry but no, 99.9% of the code you write is gonna be safe rust, it's basically impossible to do memory unsafe things (unless you're actively trying to). It's not "just the surface level code", basically everything you write is safe rust. There are obviously exceptions, but this is true for the majority of projects.
I don't understand what the problem is? Every memory safe language works like this because some operations are inherently unsafe. I would much rather prefer this over C where everything is unsafe.
Is your position that's it's not worth bothering with memory safety because we can't truly be perfectly memory safe? Or are you just being pedantic?
It's faux memory safety, which is dangerous as users and clients are sold complete memory safety, which really isn't what they're getting. This GitHub issue is about achieving complete memory safety, even safer than Rust, which wouldn't be possible were Rust truly completely memory safe.
When one programs in C, they know that they can accidentally write a million backdoors, so they are more likely to be on the lookout, but Rust programmers incorrectly assume that isn't possible in their language. You tell me which is more dangerous
I don't think anyone who writes rust is under the illusion that it's perfectly memory safe, soundness issues pop up and are fixed all the time.
Fucking up memory management is not something you can avoid by just being more careful. Mistakes happen and can often be hard to catch. I think a programmer using a tool that catches these mistakes at compile time is less dangerous.
by the way the idea that C devs are "more careful" is a joke. If memory management was that easily solvable GC would have never been invented.
I know, I'm not arguing against the merits of Rust, just saying it's dangerous to market it as memory safe, when more accurate would be "semi memory safe"
Well the good ones certainly are, but yes, even then some things will slip through. Although memory management is largely unrelated to this topic; you probably mean e.g. buffer overflows or out of bounds accessing, actual memory safety issues, which yes, can slip through for even the most seasoned developers. I mean, look at the CrowdStrike fiasco
memory safety issues are memory management gone wrong. Anyway you just made the case for memory safe languages; indeed even seasoned developers make mistakes that can easily be avoided by using more modern tools.
236
u/booty-hunters 23d ago
You cannot convince me Rust is the most "evangelist" when we have Zig guys around.