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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,842accb6a7d76669 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-13 09:20:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjcppf01.usenetserver.com!usenetserver.com!news-west.rr.com!lsnws01.we.mediaone.net!typhoon.san.rr.com!not-for-mail Message-ID: <3BF1567C.89167E12@san.rr.com> From: Darren New Organization: Boxes! X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.1 References: <9s941i$11mrei$3@ID-25716.news.dfncis.de> <9s9nkr$11se3h$1@ID-25716.news.dfncis.de> <3BEC9BB8.6010708@telepath.com> <3BEC9F87.DBED743D@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 13 Nov 2001 17:21:19 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 1005672079 66.75.151.160 (Tue, 13 Nov 2001 09:21:19 PST) NNTP-Posting-Date: Tue, 13 Nov 2001 09:21:19 PST Xref: archiver1.google.com comp.lang.ada:16428 Date: 2001-11-13T17:21:19+00:00 List-Id: Stephen Leake wrote: > > I'd go with "singleton". The only reason it "already has a meaning in > > CS" is that the meaning is the same. A singleton set is a set with only > > one element, a singleton list is a list with only one element, and a > > singleton class is a class with only one instance. > Not that it makes much difference, but this *is* usenet afterall... ;-) > That last one is more commonly heard these days, and is significantly > different. I suspect it's more commonly heard by folks who have been programming much longer than they've been out of high-school. :-) > A true singleton class _cannot_ be expanded to have more > than one instance _by design_. The "singleton" list discussed here is > just the initial value; it can easily be expanded. A "singleton list" can never be expanded in math, since math is "functional" so to speak. That Ada isn't functional rules this out. Is it possible to do the Singleton pattern in Ada? I guess a limited type that always refered to a global, or even just a global variable would do it. Since Ada supports procedural programming, you don't really do "singleton" in Ada, I expect. > That difference is enough to rule out "Singleton" for me. But certainly, if it causes confusion, a better name should be chosen. -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. You will soon read a generic fortune cookie.