Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should try zig. You'll never want to go back, and the c interop is so good, it's easy to kill the c code over time using embrace extend extinguish.


As someone who loves C, Zig has replaced C for me and I don't plan to go back.

There are just too many benefits, not least developer velocity and readability.

Zig is also very approachable to anyone who is familiar with TypeScript, in a way that C isn't. This means more of your team can get excited and get involved, at least in terms of reading the code.

And with Zig, where you have to spend a little extra maintenance time paying for the language being pre 1.0, that's still nothing compared to the upfront and long-lived costs associated with C. You can develop so much faster in Zig compared to C, that you're ahead even pre 1.0.


To expand on this a bit: I feel like learning Zig has helped me better understand C, particularly when it comes to allocation and pointers. Zig has more facilities to specify the intent behind a lot of the common C programming concepts, which has helped make things "click" in both languages.


I do like Zig’s import construct.

    const print = @import("std").debug.print;
I’m looking for a new systems programming language. For all the hype of Rust, I don’t think this is it.

How does Zig compare to Nim?

Does Zig have a future in games programming? I feel games programming is the ultimate test, to validate the true success of a programming language.

I do like that Zig compiles to LLVM. Although this in itself will exact a minor performance penalty, in exchange for wider CPU coverage.

Nim transpiles its code down to C, and I’m not certain how that will play out. As you’re now writing your new language on an already somewhat buggy language.

But this does give Nim the possible speed advantage, of getting the code compiled closer to the metal, whereas Zig will compile to the intermedia LLVM layer.


> I do like that Zig compiles to LLVM

It's going to start compiling to zig IR soon (if it doesn't already), and zig IR will be translated to LLVM IR or fed into zigc. So I think the recommended development cycle will be - use zigc for fast iteration on localdev, then when releasing, use slower LLVM for extra optimization passes and also for cross-compilation.

> gamedev

I think the highest interest in zig is currently gamedev, but there are SO MANY uses for zig.

If I may be permitted some shameless self-promotion, zig is pretty awesome: https://www.youtube.com/watch?v=l848TOmI6LI




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: