News for hackers. Stuff that matters.
Re:Why Zig over C for Systems Programming by dava96 on Friday November 13, 2026 @12:36PM (#50486863)
I've been toying with the idea of learning zig and weirdly enough I was looking at this guys book. I don't have any experience with low level languages. The closest I've gotten is Go.

I was debating between C and Zig, but I still don't really know what I want to choose. Feels like C is probably the right choice given the languages age and it could technically be more useful (not that I'd be looking for a job doing C work).

For those that know both, what would you pick?

Re:Why Zig over C for Systems Programming by meerita on Friday November 13, 2026 @12:44PM (#50487013)
It depends for what you want it. If you're going to do an API, well, Golang is more practical here in my opinion. For TUI apps, I would dare to say Rust was more pleasant than Golang. My experience with Zig was limited, I would not say is not a good fit.
Re:Why Zig over C for Systems Programming by kev009 on Friday November 13, 2026 @12:46PM (#50487048)
C is still supreme for working on the majority for a Linux/BSD system stack. It also imparts skill that transcend to most other spaces where you may eventually need an FFI to interact with a library anyway or understand how it actually runs on a system.
Re:Why Zig over C for Systems Programming by mmilunic on Friday November 13, 2026 @12:50PM (#50487104)
I would say from a pedagogical perspective, learning C is hugely useful for understanding how programming works at a much lower level.

This has the benefit of you learning about manual memory management and how to deal with all the issues that come with such a rules free language like C that will basically let you do anything. This understanding means lot of the constraints and features that safer languages like Zig and Rust add start to make a lot more sense. For example, going from Python to Rust, the borrow checker will probably seem rather arbitrary, but going from C to Rust, you will find the borrow checker is just automating a lot of checks you were already doing yourself.

TLDR: Learn C. I would recommend the 15122 CMU course as a pretty good foundation. You can find it online here https://www.cs.cmu.edu/~15122/schedule.shtml .

Re:Why Zig over C for Systems Programming by SoftTalker on Friday November 13, 2026 @01:56PM (#50488077)
For that matter, assembly is useful as well. Not that you have to become an expert in it, but do enough that you understand it from a practical standpoint. It doesn't even have to be on x86, use an emulator of something simple like a 6809 or 6502. I never had trouble understanding pointers in C once I had some experience writing assembly code.
Re:Why Zig over C for Systems Programming by pastel8739 on Friday November 13, 2026 @12:51PM (#50487114)
I think you should know C if you want to do low level stuff. It will help understand why zig (or rust) is built the way it is and what is useful about it, too.