Ask HN: Rust, Zig, or C?
To be frank, does it matter in the AI vibe coding era? so long you can understand the program, although in a unfamiliar language, but you can read and write in C!!
It’s something I still believe, even now, in the age of AI.
I wanted the compiler to automatically parallelise and vectorise my code, because CPUs these days are inherently multicore, and not using the GPGPU seems like a huge waste of resources, so: xc[1]
Structured closely to “C with classes”, but has blocks/callbacks as fundamental types and implements ARC to make memory management pretty trivial. Allows 3rd-party libraries without header files by reading the DWARF content of the library, does the auto-detection of data-parallel code etc etc. Docs at the link.
And my favourite flavour of ice cream is vanilla.
Very good build tooling was huge plus, but now with llm this is not a differentiator anymore.
With strict c compiler flags, and other sanitizer tools many of the niceties of zig can be solved - maybe not all.
Two big items -- RAII, and memory safety -- neither Zig, not C solves them. Rust does.
So, I would choose C or Rust based on the needs.
Also, if someone here have a compelling reason as to when/why Zig is useful in professional grade projects, where the language has to scale to large codebases, I would like to hear it.