I remember in C++, I had to do double-dispatch using the visitor pattern. This
is cumbersome, just because each subclass has to have the exact same
singly-dispatched code that looks like:

void dispatch(Base& other)
{
   other.dispatch(*this);
}

Is there a nicer way to do this in D, or am I stuck with the same thing?

Reply via email to