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.

@programming@programming.dev

  • onlinepersona@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    3 hours ago

    Is zig memory safe by design? If not, rust will “win”. Large companies aren’t going to hire for an unknown or unpopular memory unsafe language when they already have C or C++ - there’s just no contest.

    Last I read, zig didn’t even have a standard string library. Unless that changes, it won’t even be a viable alternative to C/C++.

    Edit: I checked and got this

    the Zig language, like C, entrusts memory management to humans, placing full trust in human development. Zig then provides some memory safety checks to ensure memory safety. However, it still lacks the strict compile-time guarantees of Rust’s ownership system and borrow checker. Therefore, when writing Zig code, developers need to pay more attention to potential memory safety issues and ensure that errors and exceptional situations are handled correctly.

    Rust Magazine

    Anti Commercial-AI license