3 ms·
While I understand your reaction, I wasn't really diminishing anything. The OP I was responding to was saying other languages should do generics like Zig, and I
by naasking 5y ago
While I understand your reaction, I wasn't really diminishing anything. The OP I was responding to was saying other languages should do generics like Zig, and I basically just replied that other languages have done it that way (or rather, that Zig did it their way), and also pointed out some common pitfalls.
Zig may of course have found a better set of tradeoffs to make this feature more ergonomic, but I think this is more due to comptime than generics specifically. comptime would restrict the expressiveness that would normally lead to undecidability when reifying types as values, if I understand its semantics correctly.