Subj : Re: OO compilers and efficiency To : comp.programming From : Gerry Quinn Date : Wed Jul 27 2005 02:37 pm In article <1122402008.124827.269060@f14g2000cwb.googlegroups.com>, robert.thorpe@antenova.com says... > Chris Sonnack wrote: > > websnarf@gmail.com writes: > > > > > So is the answer to the OP's question: you don't write code that is > > > really C code, but rather, you translate it to C++ equivalents that > > > behaves exactly like it was C code, so that the compiler can produce > > > the same result? > > > > Sure, why not? The upside of a mixed-mode language, like C++, is that > > you can strip down to the bare essentials when necessary but also have > > the language-supported abstraction of OOD available. > > This is OK for little bits of code, but not for large pieces. > > Doing this gives you all the downsides. The developers must be > conversant with C++, that is everybody must know what a virtual const > friend private method is and how it behaves. This also means all the > developers have got to be really smart. Nonsense. The C-like bits should be encapsulated in classes with standard interfaces - there is no reason for them to be exposed to the main part of the program. - Gerry Quinn .