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

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




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

Search: