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 21:05:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!ppp-1-18.cvx1.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.1 Date: Wed, 14 Nov 2001 04:01:06 -0000 Message-ID: <9ssu28$150jnq$2@ID-25716.news.dfncis.de> 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> <3BF1567C.89167E12@san.rr.com> NNTP-Posting-Host: ppp-1-18.cvx1.telinco.net (212.1.136.18) X-Trace: fu-berlin.de 1005714313 38817530 212.1.136.18 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:16482 Date: 2001-11-14T04:01:06+00:00 List-Id: There is another possibility that some people may like. My proposal includes overloadings of the "*" function to provide replication. So instead of: Cuddly_Marsupials := Singleton("Koala"); one could write: Cuddly_Marsupials := 1*"Koala"; The problem with this replication form is that, in the case of string elements, it could lead to ambiguities if a type from Ada.Strings.* is visible, and in the case of integer elements it would certainly lead to ambiguities. I have suggested other names. How about: Cuddly_Marsupials := Only("Koala"); ? -- Best wishes, Nick Roberts "Ben Place" wrote in message news:B8171B48.5D00%benjaminplace@NOSPAM.sprintmail.com... > Ted Dennison at dennison@telepath.com wrote on 11/13/01 3:36 PM: > > > I suppose we could just create a null list and make everyone "&" to that, just > > to stop the bickering. :-) > > Why not overload a "Create" function so that it takes either no arguments, a > single element, or a list. > > This would return a null list, a list with a single element in it, or a copy > of the list passed in, respectively. > > And can I vote for calling it "Create" while I'm here not lurking? > > Thanks, > Ben Place >