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.13.212.204 with SMTP id w195mr7502967ywd.13.1438431545207; Sat, 01 Aug 2015 05:19:05 -0700 (PDT) X-Received: by 10.140.21.74 with SMTP id 68mr72500qgk.16.1438431545173; Sat, 01 Aug 2015 05:19:05 -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.mixmin.net!enother.net!enother.net!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!z61no4593982qge.0!news-out.google.com!b31ni3026qge.0!nntp.google.com!z61no4593977qge.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 1 Aug 2015 05:19:04 -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: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> <014427b1-ff7a-4a69-82e6-0330af77ed96@googlegroups.com> <91f88d79-197c-419f-84a8-908e05967a2c@googlegroups.com> <135c2b00-d13c-4f5d-a586-8aca442d363b@googlegroups.com> <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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <84debe67-b26c-40c6-93ae-a2dec28f081b@googlegroups.com> Subject: Re: Running a preprocessor from GPS? From: EGarrulo Injection-Date: Sat, 01 Aug 2015 12:19:05 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 3326 X-Received-Body-CRC: 3378669103 Xref: news.eternal-september.org comp.lang.ada:27297 Date: 2015-08-01T05:19:04-07:00 List-Id: On Saturday, August 1, 2015 at 1:44:59 PM UTC+2, Niklas Holsti wrote: > Discussion of design patterns easily degenerates into a debate about > terminology. > > To second Simon's post, an Ada (library-level) package, as a collection > of state and operations, with necessarily exactly once instance of the > state, matches the concept of a singleton object in all respects except > as regards the "lazy initialization" thing, which to me is a very > secondary aspect of singletons. But the original point was that the Singleton pattern was conceived to work around deficiencies in the languages used in the "Design Patterns" book. I don't see how those languages are deficient in that respect. It is just that those languages implement the concept differently. What is a package in Ada, is a class with static methods in C++ and Java, or even a ".c" file in C. The goal of the "Design Patterns" book was not to describe how to work around deficiencies in a language, or even to show how to solve some design problems, but to describe but how problems had already been solved and then to establish a shared vocabulary to improve communication between designers. The "Design Patterns" book is descriptive, not prescriptive.