2 ms·
Zig is mostly a good alternative to C. If Rust or C++ are possible options, Zig probably isn't what you really want. Rust is especially good if you can keep e
by bsder 3y ago
Zig is mostly a good alternative to C.
If Rust or C++ are possible options, Zig probably isn't what you really want. Rust is especially good if you can keep everything in Rust and make the most of the ecosystem.
I like Zig, but it is a much smaller language that C++ or Rust with more than a few very, very sharp edges. That having been said, I reach for Zig in a lot more instances than I thought I would. I write a lot of relatively small programs that I want to work on Linux/Windows/macOS, and Zig is pretty good at that.
Of course, I miss Rust terribly every time I run a Zig program and get a segfault.
- Oreb 3y agoCan Zig also be used to compile static libraries for iOS and Android?
- bsder 3y agoThere's no good reason why not. Zig is, after all, a full C compiler so it can certainly create C libraries. You can create a full Zig program to run on Android: https://archive.fosdem.org/2021/schedule/event/zig_android/ https://archive.fosdem.org/2021/schedule/event/zig_android/ iOS: https://www.jakubkonka.com/2022/04/30/ios-dx-with-zig-milan-meetup.html https://www.jakubkonka.com/2022/04/30/ios-dx-with-zig-milan-...