2 ms·
1) I do not see how that's multiple dispatch. In C++ parlance, it requires C to be virtual, but that's it. 2) For symmetry, I would make C abstract in the pare
by Someone 11y ago
1) I do not see how that's multiple dispatch. In C++ parlance, it requires C to be virtual, but that's it.
2) For symmetry, I would make C abstract in the parent class, and create two subclasses, one implementing C, one implementing C'.
3) Having done that, the logic defining the order of the steps can be moved into the parent class.
4) If you want to mock things, it may help to make A, B, and D overridable in the parent class, too.