2 ms·
> Any OOP with inheritance does multiple dispatch. Java, C++ vitual functions This is incorrect. C++ and Java are typical examples of languages that lack multi
by MaxBarraclough 6y ago
> Any OOP with inheritance does multiple dispatch. Java, C++ vitual functions
This is incorrect. C++ and Java are typical examples of languages that lack multiple dispatch, but are able to emulate it using the visitor pattern, as tsimionescu already mentioned.
https://en.wikipedia.org/wiki/Multiple_dispatch#Emulating_multiple_dispatch https://en.wikipedia.org/wiki/Multiple_dispatch#Emulating_mu...
- kjeetgill 6y agoAh, yea. I was confusing dynamic dispatch for multiple dispatch. My bad!