4 ms·
This is pretty much a solved problem in languages with multiple dispatch (Common Lisp, Julia, Raku etc), the behavior lives in the methods which don't belong to
by codr7 5y ago
This is pretty much a solved problem in languages with multiple dispatch (Common Lisp, Julia, Raku etc), the behavior lives in the methods which don't belong to a specific class.
You can sort of, kind of get there with free functions and overloading as long as you're not doing anything fancy with the methods.