Remix.run Logo
▲ uecker 17 hours ago

I think this data is confounded in many ways, even assuming I would trust a blog post. But I also do not really doubt that there is advantage of average Rust code over average C++ code. There are C projects (and I suspect also C++ projects) with a very good track record in terms of memory safety, and they do it somehow magically without Rust. I think that would be a more interesting comparison to study. But ultimately, I also do not think this even a terrible important or interesting questing. It may be much more important to a company that tries to put unhackable advertisement and spyware platform into everybody's pockets. For my own security the fact that I get limited security support for Rust packages is far more concerning than memory safety ever was.

▲IshKebab 17 hours ago | parent [-]

> There are C projects (and I suspect also C++ projects) with a very good track record in terms of memory safety

Such as? I have never heard of any that had even vaguely good memory safety track records, unless they either a) never free memory (this is how Ada solves the problem), or b) aren't programs where memory safety is a significant factor, so nobody is looking (e.g. single player games, compilers, shells).

▲uecker 8 hours ago | parent [-]

Never freeing memory is a strategy that is used in the embedded world a lot. There are also a lot industrial applications where code is formally verified. (eBPF is an example where C code is verified to be safe in an open source context).

If you look in the open source world for larger projects which just use regular old-style C. I think OpenBSD and curl have a very good track record, probably also the projects by DJB (but I did not follow recent history). I am sure I can find many more examples.