[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: talk daemon : C or C++ ?
From:       Graham TerMarsch <gtermars () home ! com>
Date:       1998-09-01 6:50:08
[Download RAW message or body]

David Faure wrote:
> I need your advice on this point :
> ktalkd was at the beginning mostly C, but is now 100% C++.
> I switched to C++ when adding new functionality, to make a better design.
> But between the c and c++ version, the binary has really grown, from
> 30K to 70K, if my memory serves me well.

Personally, I've found that if you took the time to write a good C++
application, then the benefits you'll get out of it in the long run definately
outweigh any "fatness" that you get with larger binaries.  Admittedly there
are a few extra things that get linked in depending on the compiler options
that you've set, as well as C++ having more aggressive optimizations and
loop-unrolling that can result in fatter binaries.

BUT, on the other side of the coin, you also end up with a set of objects that
you can then use somewhere else if you need to.  More modular code,
encapsulation, etc.  All those wonderful little buzzwords that just boil down
to "way more maintainable code".  And, for an increase from 30->70k, I
wouldn't worry a bit.

If you'd like, I'd be happy to sit down with a more recent copy of your code
and have a run through it to see if there's anywhere that there might be some
tweaks done on it that might help trim it down. C++ has it's own little quirks
that C didn't have, and there's tons of nice ways to tweak it to work better
in the long run.

-- 
Graham TerMarsch

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic