On Mon, Mar 10, 2008 at 2:40 PM, Marcus von Appen <[EMAIL PROTECTED]> wrote: > C++ adds a lot of unnecessary overhead, limits the portability and makes > anything just a bit harder. > with respect to unnecessary overhead, if you don't use a C++ feature it doesn't add any overhead at all to the compiler output over compiling the same code as C (that was one of Stroustrop's key design goals when making C++). The C++ feature AGG uses the most is templating (it almost never uses virtual functions), which adds no overhead at all, and is far superior to trying to achieve the same goals of templating using just C. What specific overhead would someone expect to be added simply by using C++ compilers?
In terms of portability, in terms of agg code, it's already highly tested and developed to be portable, and it doesn't use stl or other c++ portability pitfalls. So the issue would just be the portability of C++ in general - so what platforms don't have c++ compilers that are readily available if not already built in to the same package that provides C compiling? As far as the idea of C++ making anything just a bit harder - I completely disagree in that C++ is a much better C compiler (scoping of variables, declare them anywhere you want, a bool type) so everything is easier until you run into a C++ construct you just haven't learned yet. But specifically in the case of agg, it uses templates which can be confusing and awkward at first - but using agg's configurable graphics pipeline system to do rendering stuff is ultimately way easier than trying to write C code to do the same stuff because it's so flexible and easy to adapt (basically it's a solution that front loads some early complexity for huge productivity gains). What specifically do people think they'd find harder in this case?