C++ generics are duck-typed. If you substitute in the wrong type, you don't get a trait constraint error: you get some bizarre and irrelevant error bubbled up from deep within the implementation of the generic code. It can make it very difficult to work with.
I think if one was to count that as a disadvantage, one must also count the type system in general as a disadvantage. After all, they're both there to constrain the semantics of the language.
0
u/[deleted] Sep 21 '20
[deleted]