5 ms·
Depends what language you're using and what polymorphism features it has... C - You don't use inheritance because it literal has none, but you can handroll dyn
by xorvoid 2y ago
Depends what language you're using and what polymorphism features it has...
C - You don't use inheritance because it literal has none, but you can handroll dynamic dispatch (interface style Abstract Base Classes)
Rust - Also doesn't have it and people seem perfectly happy with generics, sum-types, and `dyn Trait`