2 ms·
Because in typical Zig code, generics are often used to solve relatively basic problems, and not to play code golf. For instance, if you just want to write a co
by flohofwoe 4y ago
Because in typical Zig code, generics are often used to solve relatively basic problems, and not to play code golf. For instance, if you just want to write a container for a generic type T you don't need any advanced features.
Also, quite a few problems where people would reach for template code in C++ can be solved much easier in Zig with a combination of regular comptime code and only some 'generic typing' sprinkled over.