Zig is a newer language that is only on version 0.16.0. Despite it not being at version 1.x yet and therefore could have major breaking changes, there is a lot to get excited about with the current implementation of the language. It shows such promise that I’m learning it now and hope for it to become a regular member of my toolbox. Here’s what excites me about it:
Type System Sanity
I’m a very big fan of Programming Language Theory (PL Theory) and of course that means type-systems and how to encode guarantees into the types. Part of that is having the actual type system be sane and detailed enough that you can represent those requirements and prevent users (including yourself) from breaking those requirements. Zig has an advanced metaprogramming technique called comptime that I will discuss later. But part of why comptime works well is that the underlying system it builds on is sane.