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,3d3f20d31be1c33a X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Is ADA as good for graphics programming as C? (WAS: Re: Avoiding the second historic mistake) Date: 1997/07/20 Message-ID: #1/1 X-Deja-AN: 257867222 References: <5qs47k$duf@drn.zippo.com> Newsgroups: comp.lang.ada Date: 1997-07-20T00:00:00+00:00 List-Id: On 19 Jul 1997, it was written: > In article mheaney@ni.net says... > >Spoken like a true afficionado of inheritence! Well, I have some more news > >for you, Don. Nature (interpret that to mean God, if that suits you) has > >chosen aggregation as the essential means of systems construction. > > So, how does one explain what genetics tells us about DNA duplication > ftom parents to their children? How do you explain that green skinned people > produce green skinned people? and taller people most will produce taller > people? this is all nature at work, and each new creation of nature > has inherited propertites of eariler generations. I think it is a gross error of reasoning to suggest that OO inheritance is somehow "natural" because we use the same word "inheritance" to describe the process of the passing of genetic material from a biological entity to its offspring. I suppose poorly designed inheritance hierarchies must also be natural, since in nature we have examples of snippets of genetic material being transferred by virus. Reasoning by analogy is particularly suspect here. > I happend to think aggregation seems 'easier' to work with, but may be > that becuase I have not done allot of inheritence. Also inheritence, > by its nature, implies code coupling between the base and the children. > If one chances the base, then ALL of its children behaviours will change, > while in aggregation, one "client" can choose not to use the new > changed/modified aggregate component, while the rest of the clients who > used the common component can 'upgrade' to the new one. This part is right. I tend to think that inheritance and dynamic dispatch should be used sparingly. GUI programming is one place it seems to be effective. Interpreters can also benefit in some places from an "OO" approach. But aggregation is really ubiquitous. IMO, one of the big mistakes of modern CS theory is the emphasis on "better" type systems (OO type systems are the rage) over better control structures. Hopefully some of us Ada programmers will get a chance to experiment with way more powerful control structures when GNAT 3.10 comes out and some SNOBOL 4 capabilities become available. -- Brian