During my second semester while attending DigiPen IT I had to create a game in C. Since I wasn't allowed to use C++ until my Sophomore year for this game project I had to come up with a way of having strong organization during development. Class-like structures in C that allowed for polymorphism and inheritance were implemented! Virtual functions were also used to organize the functionalities of each type of object into a universal format!| Randy Gaul's Game Programming Blog
Dynamic polymorphism (virtual functions) is central to Object-Oriented Programming (OOP). Used well, it provides hooks into an existing codebase where new functionality and behaviour can (relatively) easily be integrated into a proven, tested codebase. Subtype inheritance can bring significant benefits, including easier integration, reduced regression test time and improved maintenance. However, using virtual functions in C++ brings a runtime performance overhead. This overhead may appear inc...| Sticky Bits - Powered by Feabhas
Recently I came across a blog post whose author claims, from the perspective of good coding practices, polymorphism is strictly superior to branching. In the...| pkolaczk.github.io