D pointers

Lubos Lunak l.lunak at suse.cz
Mon Oct 3 14:48:52 BST 2005


On Sunday 02 of October 2005 18:58, Nicolas Goutte wrote:
> On Sunday 02 October 2005 18:57, Cornelius Schumacher wrote:
> > On Sunday 02 October 2005 09:35, Stephan Kulow wrote:
> > > That having said, I for sure don't want to see a script output
> > > somewhere somewhen checking. But I will review new kdelibs code for
> > > over-using of inline functions (as we did in the past with d pointers).
> >
> > Ok, if the policy is "Avoid inline functions", than that's ok, because it
> > really makes sense because it makes the code more extensible.
>
> The problem of inline functions is that you cannot correct them. If the bug
> is in previous version, it will remain in already compiled software, as
> only newly compiled software could use the changed inline function.
>
> That is quite a problem in KDE 3 where constructors and destructors of many
> classes are inlined, so that you cannot add the creation (by new) and
> destruction (by delete) of the d pointer, making the whole d pointer stuff
> totally useless fot such a class.

 I'm aware of that problem too. It seems the BIC document at developer.kde.org 
could use some updating, e.g. (not only) to say sth. like "every class which 
should keep binary compatibility should have all ctors non-inline and 
explicit non-inline dtor."

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kde-core-devel mailing list