Static functions

David Leimbach leimy2k at mac.com
Mon Jan 12 19:08:22 GMT 2004


On Jan 12, 2004, at 12:50 PM, Tim Jansen wrote:

> On Monday 12 January 2004 14:56, Bo Thorsen wrote:
>> The reason for using these is optimization - especially when it comes 
>> to
>> libraries. And since almost all of KDE is made up of libraries, this
>> really is important.
>
>
> Wouldn't it be cleaner to fix the tools instead of losing another 
> piece of C++
> functionality and rewrite the source for this? You could probably go 
> on with
> optimizations that fix compiler problems until you have plain C.
>
> bye...
>
>
Perhaps its not viewed as a problem in the tools that do the symbol 
reallocations
unless you are coming from the point of view of a C++ programmer.

There are lots of things you *can* do in C++ and a good portion of them 
that you
also shouldn't :).

This is also a very platform specific issue.  A fix on Linux doesn't 
fix the linker on OS X
for instance... however OS X can be told which symbols to export in a 
library instead of
the default "all symbols exported" to make life easier on the tools.

Even AIX has different ways to make shared libs.

Advocating a "lets not expose symbols to the user that they don't need 
to see" policy
sounds like a good design choice and not a loss of C++ functionality.

Dave





More information about the kde-core-devel mailing list