Rust can have double-frees and some of the most serious memory safety errors that those cannot.
Rust can have double-frees and some of the most serious memory safety errors that those cannot.
Basically, I’d say that at fond point this gets to be a lot more complicated because you’re talking about which sets of features & cultural practices make you more or less likely to make exploitable errors. Does using a GC buy you enough to balance out the complexity fetish common in the open source Java world? Which is safer probably depends on what type of projects you work on.
Isn’t the whole argument rust vs C++ that rust gives you memory safety even though it’s more complex?
Like if you can tolerate memory issues all of the sudden to avoid complexity then there was no argument against C++ in the first place.
That's also why I mentioned culture: for various reasons, a lot of Java programmers sought ways to make tons of behaviour configurable which also means that there's both plenty of scope for log4j-style mistakes and lots of optional behaviours which might be exploitable even if few people use them. Rust's culture tends not to encourage that kind of thing as much so even though certain types of errors are possible in any language they're not equally common.