3 ms·
The answer is, not much. They're shockingly similar. Both are achieving very similar ends through slightly different means (the subtlety of `virtual` in C++ lea
by barakm 9y ago
The answer is, not much. They're shockingly similar. Both are achieving very similar ends through slightly different means (the subtlety of `virtual` in C++ leading to vtables) -- dynamic dispatch of a function based on an instantiation (a collocation of a method, as you called it)
How you implement inheritance under the hood and how you interpret the `class` keyword is another false distinction the author makes.