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,8b8748382fcfacc1 X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: friend classes in ada95 Date: 2000/04/19 Message-ID: <5AlL4.703$vE6.209799@news.pacbell.net>#1/1 X-Deja-AN: 613204271 References: X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 956163457 206.170.2.188 (Wed, 19 Apr 2000 09:57:37 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Wed, 19 Apr 2000 09:57:37 PDT Newsgroups: comp.lang.ada Date: 2000-04-19T00:00:00+00:00 List-Id: >In OO a class is data and the operations associated with that data. >Therefore, Ada doesn't explicitly have classes because the data and the >operations are not explicitly bound together. "Defined in the same package spec, and the operations take a parameter of the (tagged) type" isn't sufficiently explicitly bound together? >If we consider a class to be the tagged record and all of those >operations that have access to the tagged record then viola, there is a >class. So any user of the tagged record, even if it's an application that merely passes the object as a black box, is part of the class? Or if "access to the tagged record" means "knows about and can access the record's components", then everything in the package body, and, if the tagged record is not "is private", but rather is in the public part of the spec, then any application code, is part of the class? The dictionary definition of a class is a set of things grouped together because of a common trait. What is common to the definition of a data layout, or a data record, and a set of procedures? One is passive data, the other is active code. OTOH, a collection of things all deriving from the same ancestor, and thus sharing certain traits, the Ada usage of "class", clearly fits the dictionary definition. I guess a "proper" OOer would have to say "The class Mammalia, nursing, and live birth, are a class". Obfuscation, IMHO.