On 13/02/11 9:32 PM, Sean Eskapp wrote:
== Quote from bearophile (bearophileh...@lycos.com)'s article
Sean Eskapp:
Is there a nicer way to do this in D, or am I stuck with the same thing?
Andrei has recently said no one needs double dispatch (in D) :-) So Andrei will
be interested in
== Quote from bearophile (bearophileh...@lycos.com)'s article
> Sean Eskapp:
> > Is there a nicer way to do this in D, or am I stuck with the same thing?
> Andrei has recently said no one needs double dispatch (in D) :-) So Andrei
> will
be interested in your use case.
>
Sean Eskapp:
> Is there a nicer way to do this in D, or am I stuck with the same thing?
Andrei has recently said no one needs double dispatch (in D) :-) So Andrei will
be interested in your use case.
Bye,
bearophile
Sean Eskapp wrote:
> 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(*t
Sean Eskapp wrote:
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 t
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 s