
On Mon, Mar 31, 2008 at 9:22 PM, Maarten Kronenburg <M.Kronenburg@inter.nl.net> wrote:
Probably you would use conversion operators.
Not necessarily, you just make your operators templated on the policy. No need to do any conversions.
But runtime polymorphism allows basetype pointers to derived type objects, and still it works (through the vtable). So runtime polymorphism can never be fully replaced by something else.
Of couse you need runtime indirection if you need dynamic indirection :). But 99.9% of the times you do not need it. When you need it is easy to add.
I'm not so sure it will be 0.01%. This integer will be used by MANY users, and you try to explain to a user that it does not work once you use a base pointer to a derived object.
Uh? Users do not expect to have a base class for integers, why should they expect it for multiprecision integers? It is a value type, why would you expect to treat it polymorphically?
This will be one of the most important classes of C++, and I want it to work ALWAYS. Therefore in my opinion in this case there is no alternative for runtime polymorphism.
I'm still far from convinced. But anyways, I'm not the one implementing it, so I have little say :) At most I'll be able to voice my concerns at review time. -- gpd