KUrl(QString) fix

Aaron J. Seigo aseigo at kde.org
Sat Dec 30 08:03:11 GMT 2006


On Friday 29 December 2006 16:13, Ralf Habacker wrote:
> Which one is prefered ? Are there common rules for this ?

the problem with inlined methods in a library's public API is that you can't 
change them reliably.

the code ends up copied into the binaries built against them (hence the term), 
so if you for some reason need to change the internal behaviour of that 
method .... you can't, really, because every binary built against that older 
version of the library will still be using the old, inlined code. so you need 
to uprade every app that uses that api to get the new behaviour. in a sense, 
it violates encapsulation and the methods are no longer "black boxes" free to 
change as needed.

so unless there's some really good performance reason for inlining, it's 
probably best to seperate the implementation from the declaration.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- 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/20061230/dfbcf9ee/attachment.sig>


More information about the kde-core-devel mailing list