3 ms·
> for Ruby is ergonomics… My impression is that this is the main thing for Zig too. The intersection of the set of languages that let you write very low-level
by munificent 11mo ago
> for Ruby is ergonomics…
My impression is that this is the main thing for Zig too. The intersection of the set of languages that let you write very low-level code where you have full control over memory and allocation and the set of languages that are enjoyable to program in is pretty small.
C is in there if you've internalized many of its warts are fine with all of the many many footguns it has. C++ is in there if you much of your enjoyment comes from the machismo of feeling like you have conquered C++'s beastly language complexity. Rust is in there if proving to the compiler that you know what you're doing is satisfying to you.
Zig sort of gets out of your way like C does, even when what you're trying to do is potentially harmful. But it's more modern and expressive and doesn't have all of C's historical baggage.
- torben-friis 11mo agoOk, that makes sense. So it’s a modern take on low level languages, like rust, but for those that dislike c for being cumbersome rather than for being less secure? Is that a stated goal of the language? Other than the feature to gradually move from c++ it wasn’t super clear from the main pitch.
- munificent 11mo ago> for those that dislike c for being cumbersome rather than for being less secure? I wouldn't say "cumbersome", but perhaps "full of warts and historical baggage". They have some more details here: https://ziglang.org/learn/why_zig_rust_d_cpp/ https://ziglang.org/learn/why_zig_rust_d_cpp/