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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Sun, 2 Aug 2015 19:35:24 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <4cb32c40-f659-490d-bbb6-73585fc069e8@googlegroups.com> <7e653a88-e690-431a-9df9-3fc691466e08@googlegroups.com> <25e8deb9-a967-4856-97cb-4257e1ba7fa4@googlegroups.com> <84debe67-b26c-40c6-93ae-a2dec28f081b@googlegroups.com> <83abe7a5-69d6-4443-a976-f3b3fbed892a@googlegroups.com> <506db345-e114-4256-b36c-6f9d99431f77@googlegroups.com> <032d6485-08fc-4b5a-8f3e-1d91b1a2f757@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Mon, 3 Aug 2015 02:33:51 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="ee44d3db9c41f5ad88d7e8e8f0268f05"; logging-data="28591"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DIAPZOYCla1UG4rQrnTSAkSLhKTx4j3o=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <032d6485-08fc-4b5a-8f3e-1d91b1a2f757@googlegroups.com> Cancel-Lock: sha1:TU4EjhAgpaMolJODQtmQtq6mWQQ= X-Enigmail-Draft-Status: N1110 Xref: news.eternal-september.org comp.lang.ada:27340 Date: 2015-08-02T19:35:24-07:00 List-Id: On 08/02/2015 02:37 PM, EGarrulo wrote: > > And would that decrease complexity, or just move it elsewhere? I am afraid > that it would increase complexity, and substantially. Indeed, the "Design > Patterns" book itself recommends "Favor 'object composition' over 'class > inheritance'". And yet the Singleton pattern uses inheritance. Had the > authors felt that composition were applicable for the Singleton, they would > have adopted it, don't you think? Anyway, if an alternative to Singleton that > uses composition has been documented somewhere, I would gladly peruse it. Some years ago I published articles on the problems with programming by extension. I'm hardly going to repeat them here. Using examples intended to show the advantages of extension, I showed that programming by composition can do anything extension can, leads to code that is clearer and easier to understand, and that the examples violated basic S/W-engineering principles. The papers can be be found at http://pragmada.x10hosting.com/papers.html -- Jeff Carter "Hold your temper. Count ten.... Now let 'er go. You got a good aim." Never Give a Sucker an Even Break 105