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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7f8fc37d854731d6 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,7f8fc37d854731d6 X-Google-Attributes: gid109fba,public X-Google-Thread: 114809,7f8fc37d854731d6 X-Google-Attributes: gid114809,public X-Google-Thread: 1108a1,7f8fc37d854731d6 X-Google-Attributes: gid1108a1,public X-Google-Thread: 10461e,7f8fc37d854731d6 X-Google-Attributes: gid10461e,public From: Daniel Drasin Subject: Re: Interesting but sensitive topic to discuss (HELP: - OOP and CASE tools) Date: 1996/11/11 Message-ID: <32873B68.167EB0E7@arscorp.com>#1/1 X-Deja-AN: 195802161 references: <32813322.41C6@kyebek3.kjist.ac.kr> <55pqr5$136a@grimsel.zurich.ibm.com> <328109CD.6685@concentric.net> content-type: text/plain; charset=us-ascii organization: Nando.net Public Access mime-version: 1.0 newsgroups: comp.object,comp.lang.c++,comp.lang.ada,comp.lang.smalltalk,comp.ai x-mailer: Mozilla 3.0Gold (X11; I; SunOS 4.1.3 sun4c) Date: 1996-11-11T00:00:00+00:00 List-Id: Piercarlo Grandi wrote: > > >>> "alovejoy" == Alan Lovejoy writes: > > alovejoy> Objects are objects, not classes. > > Ok, even if there are some famous authors that don't seem to agree. > > alovejoy> OO programs are systems of interacting **objects**, not > alovejoy> systems of interacting **classes**. > > Consider: > > class complex > { > private: float rho,theta; > public: float proj_real(); float proj_imag(); > complex operator +(complex); > .... > > }; > > class rational > { > private: float above,below; > public: float num(); float den(); > rational operator +(rational); > .... > } > > .... > > > To my naked eye the above is an (outline of an) OO program, but it > contains only classes ('complex' and 'rational', variables ('c1', 'c2', > 'cin', 'cout') and procedures ('main', 'operator <<', 'operator >>' > 'operator +', and 'exit'). [Bunch of more stuff that only includes class descriptions/definitions] > > Objects do come into existence (thanks to the execution of constructors) > only during the _execution_ of the program, ... > [More examples/discussions along the same lines -------------------------------Break------------------------------ You are both right (and wrong). The question is, what is the point of the distinction. P.G. Just 'cause you can't "see" the objects doesn't mean that they're not there. E.g. A psychiatry textbook will describe behavior of "humans," "men," and "women." These are types but clearly in actual application, these "laws of psychiatry" apply to the actual individual people involved. Smalltalk, C++, and java use what's called "class-based programming" which means that the behavior of individual objects is described by its type or class. Therefor classes will be manipulated in order to affect the behavior of objects. Which leads back to by origional question: What is the point of the distinction? What is the point of saying that an OO program is the interaction of objects (and not classes)? If the point is to direct the student to understand the runtime behavior that needs to be focused on, then objects are what the program consists of (ognoring the reflective meta abilities...). However, if the aim is to understand what must be created at compile time in order to create a program, then "classes" are the elements are the program. Dan -- Daniel Drasin Applied Reasoning Systems Corporation drasin@arscorp.com 2840 Plaza Place, Suite 325 (919)-781-7997 Raleigh, NC 27612 http://www.arscorp.com