3 ms·
Agreed. Generics are in most modern typed languages, and traits are essentially interfaces. Maybe templates means C++ templates, which are essentially generics?
by Cpoll 7mo ago
Agreed. Generics are in most modern typed languages, and traits are essentially interfaces. Maybe templates means C++ templates, which are essentially generics?
- mihaelm 7mo agoMy guess is they meant metaprogramming in general (templates/generics, macros), but traits are not quite like the others.
- nesarkvechnep 7mo agoIn C++, concepts are essentially generics where templates are more like weird macros.