DRAFT document on coding conventions in kde libraries

Andras Mantia amantia at kde.org
Mon Mar 6 07:21:33 GMT 2006


On Monday 06 March 2006 01:33, Allan Sandfeld Jensen wrote:
> On Sunday 05 March 2006 19:25, Frans Englich wrote:
> > * Mention that people should avoid C style casts. Especially in
> > headers but also in implementation. From my knowledge: C++ style
> > casts are stricter and therefore gives the compiler better options
> > for statically detecting errors, and in some cases invalid casts
> > are generated by C-style casts.
>
> I do not agree. I think it is more important to warn against
> dynamic_cast<> and recommend qobject_cast<> or static_cast<>/C style
> casts instead.

What is your problem with dynamic_cast (aside that I read qobject_cast 
is faster, but only for QObject derivate classes)?


Andras
-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060306/54f5dc05/attachment.sig>


More information about the kde-core-devel mailing list