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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable 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-06 10:22:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: Eric Merritt Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.1 Date: Tue, 6 Nov 2001 10:21:25 -0800 (PST) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: avanie.enst.fr 1005070933 7856 137.194.161.2 (6 Nov 2001 18:22:13 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 6 Nov 2001 18:22:13 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: In-Reply-To: <9s941i$11mrei$3@ID-25716.news.dfncis.de> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:15936 Date: 2001-11-06T10:21:25-08:00 news:mailman.1005002950.9554.comp.lang.ada@ada.eu.org... > > A singleton is a generally an object of which > there is > > only one instance throughout the entire > application. > > That means that accessed from anywhere in the > program > > it will return the same list, in effect it is only > > instantiated once. That instance is then returned > any > > time a new list is called for. So any elements > added > > to the list are available thought the application. > > Basically a Singleton is a single instance of an > > object, ie there can never be more then one > instance > > singleton object in an application. > > That may be the meaning other languages, but not > Ada! I intended the word > ('singleton') in the mathematical sense of a set > with only one element. Okay > so we're not talking about a set, but a list, but I > think the meaning is > fairly obvious. In a program, code such as: > > Team(England,Jumping,Ladies) := > Singleton(HRH_Princess_Anne); > > would help to emphasise that a list was being > constructed that comprised > only one element. It would contrast usefully, I > think, with a multiple > constructor: > > Team(USA,TF_Relay_4x400m,Men) := > To_List((Alvin_Harrison, Antonio_Pettigrew, > Calvin_Harrison, > Michael_Johnson)); > > Of course, one alternative is not to have a > 'singleton' constructor. It's > only a convenience: > > Team(England,Jumping,Ladies) := To_List((1 => > HRH_Princess_Anne)); I was under the impression that we were talking about the singleton design pattern not a Singleton list. Actually I have never heard a single element list refered to as a Singleton. I guess you learn something every day. thank you. __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com