News for hackers. Stuff that matters.
Re:If Inheritance is so bad, why does everyone use it? by VirusNewbie on Thursday April 11, 2024 @04:38PM (#40006565)
>You can’t build a dynamic list of objects implementing the same interface in different ways with parametric polymorphism.

Yes you can. that's the whole point of type classes.

Re:If Inheritance is so bad, why does everyone use it? by layer8 on Thursday April 11, 2024 @04:54PM (#40006712)
Not without runtime polymorphism. Parametric polymorphism does not imply nor by itself implement runtime polymorphism. I.e. C++ templates, or generics in other languages, provide parametric polymorphism, but not runtime polymorphism.
Re:If Inheritance is so bad, why does everyone use it? by gpderetta on Friday April 12, 2024 @04:11AM (#40010410)
Universal Vs existential qualification.

For example in c++ std::function exhibits parametric polymorphism without templates.

Re:If Inheritance is so bad, why does everyone use it? by Kranar on Thursday April 11, 2024 @05:08PM (#40006824)
Type classes are not parametric polymorphism.