by phunge · 10y ago · 0 comments
I also find that multiple dispatch is something that's occasionally handy, but single dispatch is truly everywhere. I think if you broke down multipledispatch uses in languages which embrace it (e.g. CLOS), the mix is like 95% single, 5% >single. For single dispatch in python, check out https://docs.python.org/3/library/functools.html#functools.s... which was added in to the Python 3.4 stdlib. The alternative is the OOP subclassing style, which works but IMHO isn't very readable.
Operators in Perl 6 are all MD, so that's likely a significant factor.
Additionally it is well designed. While the functionality starting point was CLOS, the UX has the benefit of hindsight and a decade of non-stop language evolution.