From: Jason M. <ko...@gm...> - 2008-09-03 01:41:10
|
I'm not sure what the right way to handle this is. However, I can give one explaination for choosing C over C++. Nobody agrees on what is the best style for writing C++. I don't mean irrelevant things like where braces go or naming conventions. I mean complicated things: - When to use inheritance instead of containment. - The use of Resource Acquisition Is Initialization. - The use of exceptions. - The use of Pimpl. - How much templating to use. - How much operator overloading to use. I have my own ideas about what good C++ style is. I like them, and I have a pretty good defense of them. I even have a rarely-updated Blog about what I consider to be good C++ coding style. But programmers are a very, VERY picky lot. C++ programmers are pickier than most, because choosing a library that clashes with your preferred coding style is very painful. If you're not using exceptions and RAII, trying to use a library that does can be nightmarish. The takehome point being this: C isn't nice. It isn't as clean as C++ can be. But it's *standard*. Everyone knows what good C code looks like. Everyone understands it, even if things like "typedef struct" are confusing to C++ programmers. And it will never hurt you the way that using exceptions when your user doesn't want to will. On Tue, Sep 2, 2008 at 2:37 PM, Branan Riley <br...@gm...> wrote: > We're getting a lot of flac for choosing C over C++, especially now > that people have had a chance to see the math library. I still think C > was the right decision, but it's very hard to convince everyone of > this. C gives beter access to under-the-hood stuff for the curious > neophyte than a complicated C++ class/template library would. > > We should, however, better articulate our reasons for choosing C, and > get a better answer on the subject in the FAQ. The current answer just > won't cut it in the long term, especially since C is percieved as an > old, crusty language by many (Knackered's comments in the forum thread > illustrate this quite vividly). > > Any thoughts on how we should handle this would be appreciated. I may > be the de facto PR guy, but that doesn't mean I'm actually any good at > PR :-P > > Branan |