What Zig felt like, coming from Rust(besok.github.io)
273 points by ksec 24 days ago | 339 comments
tl;dr: A longtime Rust developer reimplemented a JSONPath library in Zig and shares observations: Zig's minimal IDE support pushed them toward CLI workflows, its flat file structure discouraged premature folder hierarchies, and its imperative style forced abandoning Rust's functional idioms in favor of in-place mutation. Manual allocator management is tedious but the TestAllocator catches leaks and double-frees that Rust prevents via Drop and ownership. Overall impression: Zig is fast, straightforward, and a plausible C successor, but the ecosystem is immature and the stdlib API still churns between versions.
HN Discussion:
  • ↑Rust's memory safety guarantees make it uniquely valuable compared to Zig and C++
  • ↑Zig's lack of automatic destructors (Drop) is a fundamental design flaw
  • ↓The article understates Zig's tooling — ZLS exists and supports most LSP features
  • ↓The article's framing of mutation vs immutability as a core difference is incorrect; immutable patterns work in Zig too
  • ↑Zig is not stable/mature enough yet, confirming ecosystem immaturity concerns