From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 16c477,1e5d23b20770f158,start X-Google-Attributes: gid16c477,public X-Google-Thread: 1014db,ef0074ec236ba6e3 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,b19fa62fdce575f9 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,ef0074ec236ba6e3 X-Google-Attributes: gid109fba,public X-Google-Thread: 1108a1,ef0074ec236ba6e3 X-Google-Attributes: gid1108a1,public X-Google-Thread: 108717,ef0074ec236ba6e3 X-Google-Attributes: gid108717,public X-Google-ArrivalTime: 1994-11-17 23:23:24 PST Newsgroups: comp.lang.ada,comp.lang.c,comp.programming,comp.lang.c++,comp.object,comp.databa Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!sytex!smcl From: smcl@sytex.com (Scott McLoughlin) Subject: Re: Why don't large companies use Ada? Message-ID: Sender: bbs@sytex.com Organization: Sytex Access Ltd. References: <785104767snz@rippleco.demon.co.uk> Date: Fri, 18 Nov 1994 04:54:40 GMT Xref: nntp.gmd.de comp.lang.ada:16778 comp.lang.c:68912 comp.programming:12876 comp.lang.c++:79320 comp.object:17494 Date: 1994-11-18T04:54:40+00:00 List-Id: Doug@rippleco.demon.co.uk (Doug Robertson) writes: [ Much stuff on finding Ada and C++ programmers and _real_ C++ programmers deleted. ] > > Could some kindly soul direct me towards some GOOD examples of > ^^^^ > OO C++ application source code ? > > Object Orientation is one of those things where almost everyone seems > to be able to identify what isn't, but few people seem to be able to > identify what is. > > -- > Doug Robertson Howdy, Take a look at the C++ runtime library for "good OO" C++ code. If you don't have access to the sources for your compiler, you might look at P.J. Plaugher's text. A big template based library written at HP was just dragged into the standard, so you might try to find those sources if they are available. They presumably (perhaps, had better be) are "good C++ OO" code. As for the vagueness of "OO" principles -- well, they are a pretty vague jumble of clearer principles developed in various other programming language research efforts. I'm not a big theorist, but a brief overview of the "themes" might be: (1) Variable scoping policy. (2) Extensible type systems. (3) Encapsulation. (4) Late binding of names to executable code. There's been all sorts of research on all of these in many different "directions", as it were. I find the common thread through all this that most closely tracks "OOPiness" is theme (4) when linked to theme (2) in the language design. The _way_ these themes are played out differs _greatly_ from language to language, often rather arbitrarily in my opinion, e.g., there is no obvious store of "progress" from on language design to the next. Some big differences in language design can be simplified along a few axes: (1) manifest (typed variables) vs. latent (typed values) typing. (2) explicit (delete operator) vs. implicit (gc) memory management. (3) distinguised receiver vs. full blown multimethod dispatch. Various languages, all claiming to be inheritors of OOP principles, have mixed and match the above three ingredients in various combinations. These ingredients effect the way one effectively uses the language _enourmously_ (and only the last ties in tightly to the OOP themes listed above). Thus, I disagree that there is one true "OOP" way or school into which one can be "indoctrinated". Elegant look pieces of C++/Smalltalk/CLOS/Eiffel code are going to look, "feel" and be designed very differently. Whatever "OOP"'s true merits (I think it has many, BTW) -- it's hyped up success in the marketplace, I think, is largely due to its ability the deliver large chunks of "automatic" functionality with specialization options, which has been useful restling with the advent of _enourmous_ operating system API's; GUI's are the most visible, but only one example. It seems this hasn't proved "dumbed down" enough for the hoi polloi, so "code generator" type tools are gaining popularity once again, which could have been done, of course, using a non-oop language as the target source language. Anyway, C++ is a nice systems programming language; in many ways better than C for the tasks C was supposed to address. A problem seems to be the sheer size of the language, which creates a problem for systems tools developers who want standards compliance from language vendors. It's alot easier to meet the C standard than to track the "emerging" C++ standard. I don't happen to think C++ is a great "general purpose" programming language, mainly because it is such a great low level language. A "general purpose" app language should include garbage collection and better multidimensional arrays. Maybe when the hype dies down, Eiffel, Sather, Modula-3, Lisp, Smalltalk, etc. will have their day. (Not a criticism. I use C++ everyday, but I wouldn't wish it on my dad's MIS crew!) Sorry for the long post. I've been thinking about languages alot recently. ============================================= Scott McLoughlin Conscious Computing =============================================