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: Jon S Anthony Subject: Re: friend classes in ada95 Date: 2000/04/21 Message-ID: <3900FF3C.65D5@synquiry.com>#1/1 X-Deja-AN: 614163425 Content-Transfer-Encoding: 7bit References: <8dh37m$qef$2@wanadoo.fr> <3B5L4.1317$B43.116109@news.pacbell.net> <38FD1830.949F5E81@mindspring.com> <38FD1C9E.7C2B7756@research.canon.com.au> <8dldqi$mb7$1@nnrp1.deja.com> <38FE365D.31C893A6@acm.org> <8dmjsq$vm9$1@nnrp1.deja.com> <38FF3914.839040E2@earthlink.net> Content-Type: text/plain; charset=us-ascii X-Trace: client 956366732 38.151.18.1 (Fri, 21 Apr 2000 21:25:32 EDT) MIME-Version: 1.0 NNTP-Posting-Date: Fri, 21 Apr 2000 21:25:32 EDT Newsgroups: comp.lang.ada Date: 2000-04-21T00:00:00+00:00 List-Id: Charles Hixson wrote: > My original definition of an Object (I was coming to C++ from C > after being exposed to Apple's Object Pascal) was: An object is a > data structure combined with the methods defined to access it. It > is made useful by inheritance. Or true delegation (you don't need to have class based "oo" to have "oo", ;-) > I still think that this is the "basic" definition in most languages, > however Ada and Lisp parse the world very differently. In their > view, the methods are NOT a part of the object. They are just being more "honest" - the methods are not part of the object in nearly any of these other languages either. About the only exceptions to this are some CL based methods-per-object object systems and Object Logo. Note that building a standard simple "distinguished object" version of OO in CL is about 4 or 5 pages of code. Complete with standard module/class conflation, er constructs, method definition, etc. Even includes MI. > So we are left with Tagged ADT's which are made useful In Ada. In CLOS you have: generic functions and true multiple dispatch (+ the MOP, with which you can decide your own method dispatch protocol if need be). > through inheritance. Personally, I think that it makes a reasonable > amount of sense to chunk the methods with the object, but I'm not > vehement on the point, It is the naive and simplistic way. It is also rather limited (and limiting) and a poor way if you really are interested in creating highly expressive systems, i.e., solving problems and not just interested in towing the standard simplistic OO line. Frankly, the standard OO line is highly overrated and rather boring. /Jon -- Jon Anthony Synquiry Technologies, Ltd. Belmont, MA 02478, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari