BinaryHeap usage

bearophile bearophileHUGS at lycos.com
Tue Dec 14 22:28:28 PST 2010


Matthias Walter:

> Any further ideas for this problem, or did I cover everything already?

For a C programmer the solution with pointers seems more natural, for a Pascal-family programmer the solution with indexes seems more natural, a bit safer (and it is probably just as fast). A third possible solution is to turn Foo into a class, that in D are always managed by reference, so it moves just the references. Turning the Foos into Rebindable!Foo too may be used for your purpose.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list