On Thu, 10 Feb 2011 08:02:08 -0500, d coder <dlang.co...@gmail.com> wrote:

Thanks Lars and Bearophile, I will give it a try.

I understand that static downcasting is dangerous. But there are
places where efficiency is paramount and you are sure that the casting
is safe. So I wholeheartedly second your proposal to have the stuff in
phobos.

Be aware that blindly casting interfaces is not a good idea. An interface pointer is offset into the object and the cast *must* be dynamic.

Casting objects from one class to another should be reliable, however.

-Steve

Reply via email to