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: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,3d3f20d31be1c33a X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,2c6139ce13be9980 X-Google-Attributes: gid109fba,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Composition vs. Inheritance (was Re: Is ADA as good for graphics programming as C?) Date: 1997/07/18 Message-ID: #1/1 X-Deja-AN: 257679879 References: Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel,comp.lang.c,comp.lang.c++ Date: 1997-07-18T00:00:00+00:00 List-Id: Matthew Heaney wrote an excellent post on why aggregation should be favored over inheritance in most cases, ending with: > Now, what were you saying about not be able to model the problem directly? Amen. For years I have been saying that the first lesson of Ada style is to model the problem domain not the solution. Ada has a rich vocabulary for modelling the "real world". As we all know, the requirements keep changing. The problem space evolves too, but in most cases, at a slower rate. In addition, code that models the problem space is much easier to reuse within a domain--the problem space hasn't changed. I have actually had cases where out of a 50K SLOC program, the only thing not reused on the next project was the 300 SLOC main program. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...