Depends on the way generics is implemented in the language you're talking about.
In D, for example, Zig's `anytype` is equivalent to using a template type `T` in D without any constraints. The result is the same: the implementation can call any method, but it must exist when the type is instantiated (on an invocation).
Depends on the way generics is implemented in the language you're talking about.
In D, for example, Zig's `anytype` is equivalent to using a template type `T` in D without any constraints. The result is the same: the implementation can call any method, but it must exist when the type is instantiated (on an invocation).
Example in D:
https://run.dlang.io/?compiler=dmd&args=-unittest&source=str...