[fpc-pascal] Re: double dispatch

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Mar 19 16:06:29 CET 2011


On 19 Mar 2011, at 15:58, leledumbo wrote:

>> No, because overloading works the same as in C++ (determined statically at
>> compile time).
> 
> Are you sure, Jonas?

Yes.

> Because I've been able to implement visitor pattern
> which is a kind of double dispatch. Of course it's not implemented like the
> example posted by the OP, but more like a simulation explained in 
> http://en.wikipedia.org/wiki/Double_dispatch wikipedia .

Exactly, it's an emulation: achieves the same effect without availability of double dispatch.


Jonas


More information about the fpc-pascal mailing list