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: 109fba,97482af7429a6a62 X-Google-Attributes: gid109fba,public X-Google-Thread: 10d15b,97482af7429a6a62 X-Google-Attributes: gid10d15b,public X-Google-Thread: 103376,97482af7429a6a62 X-Google-Attributes: gid103376,public From: house@helios.usq.EDU.AU (ron house) Subject: Re: C++ not OOP? (Was: Language Efficiency Date: 1995/04/20 Message-ID: #1/1 X-Deja-AN: 101281665 sender: news@zeus.usq.edu.au (News Administrator) references: <3mbmd5$s06@icebox.mfltd.co.uk> <3mujnl$4u8@atlantis.utmb.edu> organization: University of Southern Queensland newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.cobol Date: 1995-04-20T00:00:00+00:00 List-Id: Curtis Bass writes: >matt@physics10.berkeley.edu (Matt Austern) wrote: >> >> That's the distinction between "pure" and "hybrid" object-oriented >> language? The distinction is simply whether it's possible to define >> routines that don't belong to objects? >> >> That strikes me as a really minor issue; it never would have occurred >> to me, in fact, to use that one feature as the basis for a whole >> distinction. (And yes, I have used both languages where such routines >> may exist and languages where they may not.) This is more a matter of >> syntax than anything else, and it has no significant effect on >> programming style or organization. >In a pure OOPL, it is virtually impossible to avoid encapsulation. >All procedures must be attached to a data structure, and the data >in that structure can only be accessed by the attached procedures. >Global variables don't exist as such, which means that all data >MUST be a apart of an object. >In a hybrid, data and procedures can exist as separate entities. >Encapsulation is not enforced, and can be abandoned entirely. >If you want to think of these as "minor" issues, I obviously >cannot stop you. Personally, I don't think they're minor at all. I think the original point was that we can define a single huge object that contains all the procedures of an erstwhile nonOO program. The erstwhile globals become the data of the object and the procedures the methods. Thus, with absolutely no change in process during software design, the OO language can be used to produce something that has an identical structure as before. So I would agree with Matt: this is really a minor issue. Therefore I don't class this as the OO distinction. OO is a design method which languages can support or not. OO is not a language property. The design method is to find datatypes with well- defined behavioural properties and make them into abstract data types, and to design similar things by inheritance relations, which will in turn allow polyporphism via method overriding. -- Ron House. USQ | A nonviolent diet is the (house@usq.edu.au) Toowoomba, Australia. | foundation for a nonviolent world.