The main downside of generics is that once your language has them, you will spend the majority of your time going forward working on the generics implementation
Conversation
IME this is only true insofar as your language does type-directed dispatch or derivation, or has subtyping and variance issues. If your generics are unrefined and unrelated universals/existentials, you can mostly just implement them once and move on.
2
12
Maybe. I think it's also possible that different factorings of concerns can have different incidental complexity, and am not certain "encode everything as higher-order pattern unification problems in the generic matching algorithm" is the global minimum.
2
1
(_Especially_ not when it's intertwined with more than zero orthogonal overload-resolution systems. C++ and Swift did not dodge this bullet; Rust very narrowly did, thank goodness...)
1
2
One day you will come back to the warm embrace of dynamic typing Joe
1
6
Yeah, at least this I think I agree with: I'd prefer the boundary be such that the system can decide which programs run (i.e. which functions are called) without any type judgements. But that paints a _lot_ of the contemporary design space out.
1
1
Yeah, I'd be sad to give up all the leverage you can get from type directed metaprogramming :/



