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: "Robert I. Eachus" Subject: Re: friend classes in ada95 Date: 2000/04/29 Message-ID: <390B0C62.CDF0FDAC@earthlink.net>#1/1 X-Deja-AN: 617214511 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> <8dp8ut$j9n$1@wanadoo.fr> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 957025379 63.24.56.240 (Sat, 29 Apr 2000 09:22:59 PDT) Organization: The MITRE Corporation MIME-Version: 1.0 NNTP-Posting-Date: Sat, 29 Apr 2000 09:22:59 PDT Newsgroups: comp.lang.ada Date: 2000-04-29T00:00:00+00:00 List-Id: Aidan Skinner wrote: > I'd tend to think that an object *shouldn't* be useful unless it's a > descendent of a more abstract one. I like to have a base class which > is abstract and then inherit from that, even if I've only got one > descendant at the time and I don't forsee the need for any more. It > saves having to rework stuff later. Hmmm... I like to say that Ada class hierarchies are bushier. It seems to turn out that if you take, say a Smalltalk class hierarchy and re-implement it in Ada, you end up with a forest instead of a single tree (no surprise), and most of the public derivation trees have either a single entry or a root and a number of child classes. In the private (implementation) part of the hierarchy there may be intermediate classes, but unless you are extensively using generic mix-ins, the trees are still short and fat. (And yes I am working on a paper on this right now. And the funny thing is, it ends up recommending mix-ins all over the implementation space. But the public model is stays sparse, and does not make much use of multi-level inheritance.)