3 ms·
> would you then say it had generics rather than templates? I think pcwalton's "generics" vs. "templates" distinction mostly boils down to parametric typecheck
by creata 2y ago
> would you then say it had generics rather than templates?
I think pcwalton's "generics" vs. "templates" distinction mostly boils down to parametric typechecking, which Zig's design just can't do. (Can it?)
Although, I vaguely remember some example showing that even Rust in some cases allows a type definition X<T> even when there exists a T such that X<T> would fail to typecheck.