Xref: utzoo comp.lang.c:27815 comp.lang.c++:7174 comp.lang.misc:4854 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!zardoz.cpd.com!tmiuv0!rick From: rick@tmiuv0.uucp Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.misc Subject: Re: what is c++, c, ansi c etc... Message-ID: <539@tmiuv0.uucp> Date: 12 Apr 90 11:48:34 GMT References: <6000:Apr720:31:1490@stealth.acf.nyu.edu> <28742@cup.portal.com> Distribution: usa Organization: Technology Marketing Inc., Irvine, CA Lines: 53 In article <28742@cup.portal.com>, Chewbacca@cup.portal.com (Paul Frederick Snively) writes: > brnstnd@stealth.acf.nyu.edu writes: > >>> Also what is object oriented programming? >> >>The latest name that young urban computer science types have applied to the >>old idea of adding another level of indirection to function calls. > > At best this definition is grossly naive and misinformed; at worst it is just > plain wrong. > > There doesn't seem to be a "definitive" description of the fundamentals of > object-oriented programming, so the best that I can do is to provide you with > a list of the things that come to my mind when I happen to think of object- > oriented programming: > [list of items deleted] The best "thumbnail" sketch of OOPS (Object Oriented Programming Systems) I can offer is that your programming style (well, actually your problem solving style) changes. Currently, C causes you to think "procedure-wise". In other words, you think about _how_ to solve the problem, writing a list of procedures that will accomplish the task. This involves how to manipulate the data objects you're playing with at each step of the way. In C++, the OOPS version of C, you think "solution-wise". You simply write code which treats your data objects as though they were standard C variable types. You don't have to worry about "Gee, now, if I want to add these two structures, I have to add each member of one to the corresponding member of the other" and write the code to do that each time. Instead, you simply say "c = a + b", where a, b, and c are the structures you are playing with. Later on, you write a "data abstraction" which defines what the structures look like, a set of functions and operators which perform the operations on the data, and which parts of the structures are visible to the outside world. Once that's done, your code is much more readable, since you're not writing "c.mem1 = a.mem1 + b.mem1;", just "c = a + b". That's simplifying it a bit, but the general idea is correct. C++ can really make some nasty and complex code a heck of a lot easier to deal with. -- .-------------------------------------------------------------------------. / [- O] Rick Stevens (All opinions are mine. Everyone ignores them anyway.) \ | ? +--------------------------------------------------------------------| | V | uunet!zardoz!tmiuv0!rick (<-- Work (ugh!)) | |--------+ uunet!zardoz!xyclone!sysop (<-- Home Unix (better!)) | | uunet!perigrine!ccicpg!conexch!amoeba2!rps2 (<-- Home Amiga (Best!!) | \ 75006.1355@compuserve.com (CIS: 75006,1355) (<-- CI$) / `-------------------------------------------------------------------------' "I bought some instant water, but didn't know what to add." - Steven Wright