placeholder

tvu-compare: rust and zig

I have spent most of the past 6 years working with the Julia programming language. Julia is a "high level" garbage-collected language with a strong emphasis on generality and extensibility. While Julia is miraculously well-suited for the types of applications for which it was originally conceived (s...

Click to view the original at expandingman.gitlab.io

Hasnain says:

Great analysis of both Rust and Zig from a Julia programmer. I’m still a rust fanboy but Zig has been on my radar quite a while and I’m looking forward to exploring it.

“So when should a person use rust and when should they use zig? After all, my conclusion here is certainly NOT "everyone should use zig instead of rust". The languages have similar goals, so this will usually come down to personal preference. Obviously, if, for whatever reason, you are ultra-paranoid about memory safety issues but cannot tolerate garbage collection, then it's almost as if you are obligated to use rust. That said, of course rust cannot magically guarantee that you will always write "correct" code. It's also not as if every piece of zig, C or C++ code you write is constantly at risk of segfaulting. In my C++ days, I can't say that the kinds of memory issues that rust was designed to solve were very often a serious concern for me (though, it's worth pointing out that I was doing scientific/numerical stuff that tended not to force me to do nearly as much allocating and deallocating as a more complicated run-time might).”

Posted on 2022-02-01T07:40:10+0000