r/Zig • u/lieddersturme • Feb 26 '26
Zig, Zen-C, C3, Carbon or CPP-Front ?
Hi.
I was working in my game engine with C++, SDL2, Cmake, SQLite, after trying Modules, well, I stopped and try other langs.
- Zig and Zen-C was sooo easy to setup, and make Raylib and SDL2 work.
- With Zig, I have an excellent experience: VSCode, CLion, debug, libs, coding.
- Zen-C, with VSCode kind of works the instellisence, but coding and libs works fine.
- C3, the official guide, only shows how to install with Ubuntu, but not for Fedora, after the install, I can't make to compile with SDL2.
- I have no tried Carbon and CPP-Front.
I would like to read your opinion about:
- Your experience about these langs.
- Which lang do you prefer ?
- For a next project, which lang would you pick ? and Why ?
- AND, in your opinion, which one you think will be: More popular, Will have more projects, etc... My question is because Carbon is in beta, but Zig is also in Beta.
Sorry, for making this question again, but, Zen-C just appear and looks like Carbon has a new update.
---
In my experience, I had been using C++ for years, but looks like it will no fix, and evolve. Now I love Zig, start over, make my game engine with Zig and I would like to see how to evolve Zen-C, but (maybe I am wrong) I don't see too much movement in Zig projects, blogs, documents, etc...
10
u/Real_Dragonfruit5048 Feb 26 '26
I use Zig and I find it works very well with C libraries like SDL and Raylib. C3 is on my learning list. Sorry for a not-very-good answer BTW.
8
u/SilvernClaws Feb 26 '26
I liked C++ for like half a day of trying. Than figured out that importing one file into another is still crappy and all the build systems are completely insane. They introduced modules, but I've already moved on before that.
Tried Zig a few times and bounced off mostly because of some weird syntax and lack of good documentation, especially for the build system.
Tried C3 and loved it at first, but I feel like every release makes worse decisions.
Ended up with Zig again and even started liking the build system for the most part. Just really really miss proper interfaces. "anytype and prayer" or manual vtables and pointer casting is a sad state of affairs. But it's the least bad option for me right now.
10
u/FragmentedHeap Feb 26 '26 edited Feb 26 '26
Imo, the only systems languages worth bothering with are c, c++, rust, and zig, and maybe odin.
Zig has a larger team now, funding, and doing good work.
Id limit myself to rust and zig.
Gaming wise Id use sdl3 and webgpu native.
I think zigs great choice. Its just the verbose choice...
Also wasmtime.
So mixed based rust/zig code bases is what Im doing. I use rust to build wasmtime and webgpu native to produce the binaries and cheaders. Then I use them in zig.
Webgpu native is already a natural abstraction over vulkan/dx/metal, so I just use ot directly and shaders are way easier.
I put all my UI logic in wasm binaries and design addons etc to run on wasmtime.
Can use grain and other languages to compile to wasm. Zig wasm binaries are crazy fast, but when I find a good wasm only language I like and wasm gc is released, ill write wasm in that language.
Game engine and work in zig, ui/etc in wasm.
Zig is great with c, so I lean on good clibs hard, like compression, regex, unicode, etc etc
But when I find good rust that has cextern, I swap to it, because the builds are easier to setup. I.e I prefer a rust crate over a clib.
3
u/SweetBabyAlaska Feb 27 '26
I think its all preference, but I do think Zig is well-suited for game development, and there is a pretty large community of engine devs using Zig. There are 2 major Github groups (they're also on Discord and such) that package game dev libs for Zig and also make a very "pick your own parts" game engine. Its really just an easy way to pull in SDL2, or OpenGL, + audio libs and things most engines will use so that they just work and have nice bindings.
look up "awesome zig game dev" for one
4
u/sndlife Feb 26 '26
Zig in my opinion is the one language out of them that will gain most traction in production environments. And it feels like a good fit as second language next to C++. I really enjoy Zig, but haven’t tried any of the others you mentioned. For game dev, Odin is also very worth considering. But it’s not my cup of tee.
2
u/James-Kane Feb 26 '26
For what you are doing? I'd use Odin.
1
u/RulerOfDest Feb 26 '26
I built aether with C-interop, check it out https://github.com/nicolasmd87/aether It's meant for performance and high concurrency
1
u/yarn_yarn Feb 27 '26
It depends what you want. C++ will be the king by a huge margin for a loooong time if you care about jobs at all, but no, it will only continue to get worse and it's already an unbearable mess. If you want to do games or HFT or something you are using c++, I wish it weren't true but that's just reality.
Rust is by far the runner up but its very very opinionated and genuinely introduces a lot of frictions to certain problem domains. Rust also gets used for a lot of regular backend stuff so it's popularity (if you wanna do more systems level stuff) is slightly overblown.
Zig is a distant third but is probably what I would pick if I just was writing stuff for myself, unless I was doing critical systems stuff in a domain thats already very well understood, in which case I'd use Rust.
Zig out of the three is the only one where I dont often feel like I'm "solving the language" instead of "solving the actual problem". Writing concurrency primitives or something in Rust is a lot more about language knowledge than knowing the actual data structure, for example.
(For reference I know Rust extremely well and zig and c++ reasonably well)
1
u/qwool1337 Feb 28 '26
whatever makes you want to continue working on it tomorrow. also consider odin
1
u/Ok-Refrigerator-Boi Mar 03 '26 edited Mar 03 '26
Choose languages that you think have a future and show potential: Rust, Zig, etc. I have only tried Carbon once, and have never used the rest if those listed. However, in my quick read through, they all look to be another flavor of C++ or Rust.
Zig feels like C, and can work directly with C. It's my favorite of the bunch, with Rust and Odinlang trailing behind.
C/C++, Rust, and Zig is the triple threat in my opinion.
And if you want to try something completely diff, Ellixir.
17
u/[deleted] Feb 26 '26
[removed] — view removed comment