PushButton@lemmy.worldtoLinux@lemmy.ml•Linus Torvalds: Speaks on the Rust vs C Linux Divide
245·
1 day agoZig is “c”, but modern and safe.
The big selling points compared to Rust are:
- A better syntax
- No hidden control flow
- No hidden memory allocation
- Really great interop with C (it’s almost as if you just include the C code as you would in a C code base…)
- Fast compile time
- it’s more readable
- it’s simpler to learn
The syntax is really close to the C language; any C programmer can pick up Zig really fast.
IMO Zig is a far better choice to go in the kernel than Rust.
Linux has tried to include CPP in it, and it failed.
So imagine if trying to fit in a C-like cousin failed, how far they are to fit an alien language like Rust…
For more information: https://ziglang.org/learn/why_zig_rust_d_cpp/
it’s more “it forces you to make it burrow checker friendly”.
A burrow checker is not the only mechanism to write safe code. All the mess of Rust is all because this is the strategy they adopted.
And this strategy, like everything in this world, has trade offs. It just happens that there are a lot, like, - a lot -, of trade offs, and those are insufferable when it comes to Rust…