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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.231.235 with SMTP id tj11mr14365261pac.3.1438551450612; Sun, 02 Aug 2015 14:37:30 -0700 (PDT) X-Received: by 10.140.102.172 with SMTP id w41mr113173qge.40.1438551450562; Sun, 02 Aug 2015 14:37:30 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!f3no6546588igg.0!news-out.google.com!78ni3665qge.1!nntp.google.com!z61no4862932qge.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 2 Aug 2015 14:37:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.203.145.32; posting-account=AFCLjAoAAABJAOf_HjgEEEi3ty-lG5m2 NNTP-Posting-Host: 81.203.145.32 References: <87380683vc.fsf@adaheads.sparre-andersen.dk> <347c6be9-c918-4bc0-9494-c93cd6740def@googlegroups.com> <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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <032d6485-08fc-4b5a-8f3e-1d91b1a2f757@googlegroups.com> Subject: Re: Running a preprocessor from GPS? From: EGarrulo Injection-Date: Sun, 02 Aug 2015 21:37:30 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:27339 Date: 2015-08-02T14:37:30-07:00 List-Id: On Sunday, August 2, 2015 at 9:21:12 PM UTC+2, Jeffrey R. Carter wrote: > On 08/02/2015 01:29 AM, EGarrulo wrote: > > On Sunday, August 2, 2015 at 8:05:21 AM UTC+2, Jeffrey R. Carter wrote: > >> On 08/01/2015 05:30 PM, EGarrulo wrote: > >>> I meant: a GUI application that lets the user select its preferred GUI widget > >>> toolkit (GTK, Motif, etc.) at startup. > >> > >> Programming by extension is not needed for this. > > > > How would you solve the problem, then? > > With programming by composition, of course. 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.