It's one of those things where on rare occasion where it's applicable it really simplifies the code. Kind of like dynamically scoped variables.
It's been a while that I've hacked CL, but I remember method combinators being used in mixin-style programming[1]. A call-next-method is a simplification tool in that context, and it doesn't hard-couple your generic functions. With concepts now in C++, I wouldn't be surprised to see a resurgence of template-mixins, and there it really helps to have some introspection into the partial ordering.
[1] That is, Flavors mixins, not dlang mixins ;)
Re:How C++ Resolves a Function Call
by beeforpork on Tuesday March 16, 2021 @08:56AM
(#26476082)
Well, I think they should rather react like this: "Wow, so Walter gets so much money because he writes much less convoluted code than what I would have come up with."
They will react that way when they stop being newbies.
Re:How C++ Resolves a Function Call
by WalterBright on Tuesday March 16, 2021 @04:22PM
(#26482329)
Exactly.
Sometimes I think about the advice on how to carve a figure in stone - chip away anything that is not part of the figure.
The same applies to programming. Easy to say, hard to do.
> I have no idea what purpose calling the next most specific function would serve.
This is a replacement for calling the superclass, but it uses C3 method resolution order.
Despite the power of D's overload mechanism, my advice is to use overloading modestly, not cleverly. You've written your best code when a newbie looks at it and remarks "pshaw, I could have written this! Why does Walter make so much money?"