This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

advice on development path


I've been trying to adapt my C++ project from NT to g++ on linux and in the 
process discovering many things about the state of C++ compilers and about 
the cost of the language in general.  I am at the beginning of a large 
development effort and I have two choices in front of me: C or C++.   The 
project requires building a server application where performance is 
critical.  The main problem I'm having with g++ is the much larger code 
size incurred with exceptions (I haven't found a way around this yet)  Here 
are the rest of the pros and cons around each choice as I see it:

C Pros
- virtually bug free compilers everywhere
- small code size achieved with relative ease

C Cons
- more difficult to read and work with when you're used to C++
- no exception handling to simplify error management.

C++ Pros
- abstractions can help accelerate development (most useful to me are 
encapsulation, templates, and STL)
- exceptions can help simplify interfaces and error handling

C++ Cons
- it can be difficult to write completely exception safe classes (see the 
book Exceptional C++)
- g++ and other compilers have trouble generating compact code
- harder to find programmers with sufficient C++ experience
- inevitably get drawn into some compiler conformance issue or bug

I would appreciate any experienced opinions on what other people use for 
mission critical projects.  Also, does anyone have any experience with KAI 
(I'm a bit leery of relying on them since they were acquired)

erik




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]