0 or 0L for empty pointers?
Allan Sandfeld Jensen
kde at carewolf.com
Fri Jun 23 17:09:40 BST 2006
On Friday 23 June 2006 17:46, Guillaume Laurent wrote:
> Let me get this straight : you think dynamic_cast<> is unreliable and
> prefer C style casts instead ? This begs for the usual question :
> "what's the color of the sky on your planet ?".
>
C-style cast always work and never fail, they are unsafe _because_ they always
work. dynamic_cast fail because they try to be safe, and sometimes can't
figure out if it's safe or not.
I want things to work, I can take care of safety myself. Please don't confuse
the two types of "works".
Note that I put the "I guess I am oldfashioned" as a disclaimer to say that I
don't usually recommmend others using C-style casts. I would prefer
static_cast<> in KDE.
`Allan
More information about the kde-core-devel
mailing list