Double-dispatch

Peter Alexander peter.alexander.au at gmail.com
Wed Feb 16 16:51:15 PST 2011


On 13/02/11 9:32 PM, Sean Eskapp wrote:
> == Quote from bearophile (bearophileHUGS at 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.
>> Bye,
>> bearophile
>
> The age-old collision handling problem is how I'm using it.

Use a 2D array of function pointers, with the indices coming from unique 
IDs on the shapes.


More information about the Digitalmars-d-learn mailing list