3 ms·
Zig is a boring language. As in, if you already know another programming language, picking up Zig is going to be very fast and simple. Sure, it introduces some
by jedisct1 6y ago
Zig is a boring language. As in, if you already know another programming language, picking up Zig is going to be very fast and simple.
Sure, it introduces some new concepts, comptime being the main one, but these are very easy to grasp, and you will immediately use them and understand their value.
It’s a replacement for C as the compiler doesn’t get in the way, but still brings you safety features that C never had: checked arithmetic, slices, checked pointer casts, tagged unions, nice error handling, better memory management, defer, etc.
It also has excellent support for WebAssembly.
I must confess that Zig is the first language that I’ve been so excited about since Rust.
- contravariant 6y agoOut of interest could you explain exactly what you look for in a language that makes Zig a good replacement?
- 10000truths 6y agoFor me, the best parts of it are: Very versatile metaprogramming (C’s macros make me puke), slices (if I had a nickel for every time I wrote a struct { thing_t* data; size_t len; }...), namespaces, and coupling of initialization and cleanup with defer/errdefer (gcc’s __attribute__((cleanup)) sucks to use).