Proper support for sum types or tagged unions have become table stakes for systems programming languages. However, they can incur a lot of memory fragmentation that's not trivial to avoid without good support for metaprogramming. This post goes into Zig's powerful comptime feature, and how it allows some radical approaches to efficient data structure design.