les@trigraph.UUCP (Les Gondor) (03/23/88)
Here is a summary of the replies to my query of several weeks ago about the suitability of C++ as a development language for large (>10000 lines of code) systems. ------------------------------------------------------------------ From: Dave Jones <amdahl!megatest!soleil.djones> How much benefit would depend in part on how much you will be tooling up before you write the actual application ...because class-libraries are not available yet. The winnings would also depend on how well the programmers understand and appreciate the object-oriented style. If they just write C code in C++, you don't win much of anything. The only disadvantages I can name are: 1. The compiler still has bugs in it. (I have yet to see it generate bad code without any warning, however.) 2. The error messages can be inscrutable. 3. Symbolic debuggers don't work perfectly with it. ------------------------------------------------------------------ From: rutgers!ucbvax.berkeley.edu!ames!oliveb!voder!mas1!jimb (Jim Burke) My company is involved in using another object-oriented language, Objective-C. Brad Cox has written a book entitled "Object Oriented Programming" which might be helpful to you with some of your questions. Brad is a V.P. of PPI, the company that sells the Objective-C compiler but his concepts apply to any object-oriented environment. We have found Objective-C to require a somewhat greater level of technical ability on the part of developers than traditional proceedural programming, at least in the earlier stages. The benefits come later in terms of maintenance and re-usability of code. ------------------------------------------------------------------ From: gatech!stratus!strick (henry strickland) I've only written one significant thing in C++, a toy multitasking operating system. It's only 5000 lines of C++ code (29 modules/objects), but I have the feeling of "being in control" -- where when I write in C this is about the point (5000 lines) that I start to have the feeling that I've lost control on at least something. Why do I feel more in control (more as if I do not have subtle bugs that I'll never find out) ? Here's a few reasons... 1) The Object-based style. It's clean, keeping related code together like it's supposed to do. (With inline functions, it's efficient to use smaller_grained objects than one would if only writing in C.) 2) Strong type checking. This is difficult in C because "lint" is so insatiable. You end up with ugly "x=x;" type stuff just to quiet "lint", and eventually you end up ignoring lint altogether. C++ provides the right amount of (escapable) checking. 3) Double checking. The method definitions and uses must match the class declaration, and vice versa, everywhere. If you have to change something here, you have to change it everywhere it matters all at once or it won't compile. This tends to keep my modifications sort of "serialized" and "atomic". 4) Derived classes. Quit re-inventing. And, base classes tend to set consistant coding standards. -- Les Gondor, Trigraph Inc. "Why not just do it by knife?" {uunet!ai.toronto.edu!utcsri, decvax!utzoo}!trigraph!les CSNET: lgondor@Toronto ARPA: lgondor%Toronto@CSNET-RELAY Canada Post: 5 Lower Sherbourne St., Toronto, Ontario, CANADA, M5A 2P3