Zig’s comptime is the primitive. Sum types, generics, etc. are things you can build on top.
The original example is the type-level equivalent of looking at:
int foo() {
return 4;
}
and saying “why do I need all this function and return ceremony when I can just write the number 4 verbatim?”