Sunday, February 14, 2010

Programmer - Is downcasting (i.e. casting to derived type) ALWAYS wrong?

Programmer Question

What is your perspective on downcasting? Is it ALWAYS wrong, or are there cases where it is acceptable, or even preferable or desired?



(I know a similar question exists, but that question spins out from a concrete case. I'd like to have it answered from a general design perspective.)

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails