Zig vs Rust. Which one is going to be future?
I think about pros and cons and what to choose for the second (modern) language in addition to C.
Zig vs Rust. Which one is going to be future?
I think about pros and cons and what to choose for the second (modern) language in addition to C.
How does that handle stuff like vector reallocation? Does it keep both the old and the new vector allocation around until the arena scope ends? That seems very wasteful and I doubt it is how the release allocator handles it.
This creates the risk of using the wrong allocator for deallocating.
Variance is the property of a type, not a variable. You don’t have to “manage” variance, you just have to respect it. And lifetime variance as a concept is something that exists in C/C++/Zig too and has to be respected, but the compiler generally does nothing to tell you about it. If someone doesn’t understand that then I fear for what they will write in a language that doesn’t make it clear to them.
I’m not going to spend my time watching a video just to reply to some random guy online, but I will try to give it a go later on if I have time in case it is actually interesting.
Shared libraries are in fact a massive source of unsafety since there’s almost no way to guarantee compatibility between the two sides.
And being able to track dependencies with a proper package manager like cargo already does a pretty good job at tracking what you need to update.
Most of which are actually denial-of-service, unmaintained crates, or unsoundness in some crates.
Unsoundness “vulnerabilities” which would just be considered “documentation issues” in languagues that don’t take memory safety as seriously, or maybe they would never be found because you have to go out of your way to actually hit them.