Subj : Re: OO compilers and efficiency To : comp.programming From : Chris Sonnack Date : Wed Jul 27 2005 07:09 pm Rob Thorpe writes: >> 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. If you mean, what we might call, the "driver" parts of the code, I would expect them to be fairly small. If they weren't, it might be worth extracting them into their own module separate from the main program. > 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. If the shop language *is* C++, I'd expect this to be the case regardless of whether your program had "driver" bits in it or not. Insofar as C is a much simpler language than C++, I'd think any C++ programmer should be able to hand the C bits pretty easily. Or is it presumptuous to assume most C++ programmers were C programmers? > Then you have the problems of C++ to deal with: different compilers > have subtly different opinions of what constitutes C++, making porting > difficult. They express their opinions with rather curious error > messages. True, but I'm not sure how this applies. I thought we were talking about what a C++ programmer should/would do for "driver" bits. We seemed to be assuming C++.... > After you've dealt with those you've written parts of your code in the > C style. Probably the most important parts for performance and parts > that you want to change often. I'm not sure I'd agree about the "change often". > These have all the problems of C, they're verbose.... *C* is verbose? Most of the driver bits I've seen are pretty terse. > ....and they require great attention to detail that is in > other languages unnecessary. > > I maintain an application written in this "C++ and C-style C++" way, > it's awful and it's very often troublesome to change. Okay... so what's your solution to time-critical code bits? -- |_ CJSonnack _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________| .