Re:If Inheritance is so bad, why does everyone use it?
by Kranar on Thursday April 11, 2024 @04:49PM
(#40006672)
C++ templates are a form of duck typing as well, and combined with type erasure give you a lot of the benefits of OO without the downsides.
[ Parent
| on HN ]
Re:If Inheritance is so bad, why does everyone use it?
by michaelrpeskin on Thursday April 11, 2024 @05:02PM
(#40006774)
Yes, you're right. I've done that in high-performance code where I couldn't afford the double function call of a virtual function. I forgot about that.