Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cis.ohio-state.edu!ucbvax!mtxinu!sybase!helios!txr From: txr@helios.sybase.com (Tim Rentsch) Newsgroups: comp.object Subject: Re: Seeking Object Oriented Design Training Summary: C implies C++ Keywords: Object Oriented Design Training Message-ID: <13576@sybase.sybase.com> Date: 28 Jun 91 22:52:36 GMT References: <34395@shamash.cdc.com> <13457@sybase.sybase.com> <1991Jun24.190417.10440@netcom.COM> <4203@ssc-bee.ssc-vax.UUCP> Sender: news@Sybase.COM Organization: Sybase, Inc. Lines: 47 In article <4203@ssc-bee.ssc-vax.UUCP> dmg@ssc-vax.UUCP (David M Geary) writes: > Another factor is portability. We have had to support a *Cimlinc* > workstation (never heard of one, right?), a Unix box that has a C > compiler, but does not, nor ever will, have a C++ compiler, since the > machine is no longer produced, and noone's writing compilers for it. > (BTW g++ is not an option for us, due to internal policies in Boeing). The AT&T C++ translator produces C as output. Just get an AT&T C++ source license, run the translator through itself (on a sun, say), take the output C files, ship them over to the Cimlinc, compile, and you're in business. (Honesty in advertising section: there are also some hardware/os dependencies that need to be fiddled. No big deal. Any self-respecting C programmer would have the translator ported in less than a week.) Bottom line: if you've got a C compiler on your unix box, C++ can be available. > However, this does not mean that one cannot apply the principles > of OOP when writing C. One could apply the principles of zen meditation when writing C. Would that make the program a zen program? In practical terms it is very difficult to realize the benefits of OOP in a language that does not support OOP directly. C doesn't cut it. C++ does. On a scale from 1 to 10 of supporting OOP, if C were a 2, C++ would be 417. C++ is actually more like an 8 or a 9 on the OOP-support scale -- what does that tell you about C? > There are many things one can do in C to > achieve a high degree of modularity and reusability, however, many > C programmers are not well versed in this area. Mostly agree. The word "high" is relative. "Higher than the average C program" I completely agree with; "high compared to what's achievable in C++" is, in my experience, simply wrong. Don't get me wrong: C++ has its problems (need for better tools certainly among them). Problems and need for better tools notwithstanding, C++ is still a better choice than C. cheers, Tim