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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8b8748382fcfacc1 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: friend classes in ada95 Date: 2000/04/19 Message-ID: <8dldfb$lnl$1@nnrp1.deja.com>#1/1 X-Deja-AN: 613335163 References: <8dh37m$qef$2@wanadoo.fr> <3B5L4.1317$B43.116109@news.pacbell.net> <38FD1830.949F5E81@mindspring.com> X-Http-Proxy: 1.0 x35.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Apr 19 22:54:42 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-19T00:00:00+00:00 List-Id: In article <38FD1830.949F5E81@mindspring.com>, "John J. Rusnak" wrote: > I'd have to weigh in on the opposite side. "Class" and > "object" are rather easy terms to grasp. A tagged object in Ada is NOT a class in the OO sense, and oddly this is true of a class in C++. Just because you call something a class in C++ does not mean you are defining an object or class in the OO sense. I find that pretty confusing in C++ I must say, and it definitely leads people into the realms of mega-confusion. I often see people who define "classes" in C++ and thinking they are doing object oriented programming, when they are just defining abstract data types. Class and object may be easy terms for you to grasp, but most C++ programmers seem quite confused if you ask them to define the difference between an abstract data type and an object. Tagged types are simply types with particular properties that are useful for many programming purposes (e.g. one use is to simply ensure that objects (in the Ada sense!) of the type are passed by reference, there are many many other uses, including the fact that tagged types are suitable for representing certain kinds of objects (in the OO sense). > And I can tell you through exeperience that the Ada > model has been difficult for many I have seen coming into the > language to grasp. Anyone who understands what types and abstract data types are about should have no trouble with the Ada type model. If you are talking about the "object" model of Ada, then my response is that this is VERY confused thinking. Object oriented programming is about a paradigm for program design, it is not a language construct! (Some with OO backgrounds and some without). But to each their own > I suppose. > > I agree with the comment on "code words", though. > > -John > > tmoran@bix.com wrote: > > > > A tagged type is not a class. A tagged type is a programming construct > > When first trying to understand this stuff, I personally found thinking > > of a tag on a record etc to be much easier to understand than all the > > OO stuff about classes and objects. "class" and "object" are such > > vague terms they convey little information. Also they are used for > > a variety of *different* things (see mathematics, or MS's use of "class" > > in COM). OTOH, if one's intent is to certify membership in an > > exclusive club by the use of code words known only to the members, > > then "class" is as good as anything. > > Sent via Deja.com http://www.deja.com/ Before you buy.