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=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 1014db,3d3f20d31be1c33a X-Google-Attributes: gid1014db,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public X-Google-Thread: 109fba,2c6139ce13be9980 X-Google-Attributes: gid109fba,public From: "Robert C. Martin" Subject: Re: Is ADA as good for graphics programming as C? (WAS: Re: Avoiding the second historic mistake) Date: 1997/07/21 Message-ID: <33D3B1E4.637532D9@oma.com>#1/1 X-Deja-AN: 258012245 References: X-Priority: 3 (Normal) Organization: Object Mentor Inc. Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel,comp.lang.c,comp.lang.c++ Date: 1997-07-21T00:00:00+00:00 List-Id: Matthew Heaney wrote: > > Oh, yes, I know the argument: Humans use classification to simplify things, > so we should use classification to build software, blah blah blah. Well > here's the real scoop: humans use _abstraction_ to simplify their world. > Humans view and build systems as multi-level, heirarchical structures, > using _aggregation_. So why build software systems any differently? I sympathize with this point of view. But let me add a bit more to the heresy. Inheritance, as defined in OO languages, *is* a form of composition! A derived class is *composed* of its base class along with any other elements unique to the derivative. In the specific case of abstraction by polymorphism, the derived classes that implement the interface of the base class are *composed* of the interface of the base and the implementation of the derived. Any of the abilities of inheritance can be achieved through composition, without the use of inheritance. However, such techniques can be inconvenient and error prone. Inheritance is a very nice language feature when you want to compose an interface with an implementation. > -- Robert C. Martin | Design Consulting | Training courses offered: Object Mentor | rmartin@oma.com | Object Oriented Design 14619 N Somerset Cr | Tel: (847) 918-1004 | C++ Green Oaks IL 60048 | Fax: (847) 918-1023 | http://www.oma.com "One of the great commandments of science is: 'Mistrust arguments from authority.'" -- Carl Sagan