Hacker News new | ask | show | jobs
by humanrebar 1779 days ago
> ...against polymorphism...

C has polymorphism. Inheritance-based virtual dispatch is just one kind of polymorphism. It's common to wire up polymorphism in C with bespoke data structures using tagged unions it function pointers. Changing an implementation at link time is even a form of polymorphism.

2 comments

> Changing an implementation at link time is even a form of polymorphism.

I never truly appreciated how polymorphism can take so many different forms!

yes, and that is generally worse