Why is multiple dispatch a feature?

There is definitely a valid point here about discoverability of methods in OOP vs multiple dispatch. Being able to do obj.<tab> and have immediately the list of methods attached to that object is amazing, and is one of the strong points of OOP. It’s definitely not as easy to do in julia; methodswith does not answer the problem. It could conceivably be mitigated with some tooling however. For instance, one could hack the REPL completion code so that if on write (obj, put the point before the parenthesis and press tab, it shows the list of methods for that object. I remember I played around with that some time ago, but didn’t follow through.

7 Likes