|
|
|
|
|
by hota_mazi
1878 days ago
|
|
But that's what polymorphism does. Somewhere deep in the code is calling a.foo(), but when you pass a subclass of A that overrides foo(), then this code "magically" calls that new implementation. This is where specialization shines and no other paradigm allows this so elegantly and so simply. |
|