August 30, 2004
Is cast() considered something to be used as sparingly as possible? For
instance, is it there to get you out of a jamb? Or, is cast() expected to be
used regularly, and as a matter of course?


August 30, 2004
"antiAlias" <fu@bar.com> wrote in message news:cgvqdh$2ove$1@digitaldaemon.com...
> Is cast() considered something to be used as sparingly as possible? For
> instance, is it there to get you out of a jamb? Or, is cast() expected to
be
> used regularly, and as a matter of course?
>

I'd say it depends. It's ok when working with void* or void[], when casting object types and checking for null, and when casting different number types (int, float, long; etc). Other than that, it should be avoided for safety.