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,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-09 10:02:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A nongeneric bounded string array type (was Re: Is the Writing on the Wall for Ada?) References: <3F7AC5B0.9080108@noplace.com> <3F7B7641.9030908@noplace.com> <3F7C8482.20102@comcast.net> <3F7D69EA.5030707@noplace.com> <3F7E2740.1050703@comcast.net> <3F7EBD85.8080205@noplace.com> <3F819C99.6080904@cogeco.ca> <3F844FE9.7030500@comcast.net> In-Reply-To: <3F844FE9.7030500@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 09 Oct 2003 12:47:32 -0400 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1065718027 198.96.223.163 (Thu, 09 Oct 2003 12:47:07 EDT) NNTP-Posting-Date: Thu, 09 Oct 2003 12:47:07 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:546 Date: 2003-10-09T12:47:32-04:00 List-Id: Robert I. Eachus wrote: > Warren W. Gay VE3WWG wrote: > >> One of the things that discourages me from using Bounded_Strings is the >> number of instantiations that you end up making (for each different >> string size). I would have preferred one instantiation, and then a >> discriminant that set the maximum size on the object. But that may >> have problems of its own. > > Ask, and it shall be given unto you; seek, and you shall find; knock, > and it shall be opened to you. -- Matthew 7:7 > > Sorry, I couldn't resist. Hey, I have no objection here ;-) > Here is a package with NO instantiations, and > a bounded array type that can handle different length strings. I think your package is addressing some other poster's wishes here. I was simply referring to the need to instantiate different bounded strings for _different_ variables. Arrays, of course present another challenge, which is the problem you have proposed a solution to. >... > Definitely not! I have never been one to worry in Ada about the number > of generic instantiations, so the number required to use > Ada.Strings.Bounded was not something that bothered me much. Well, I tend not to worry about this in my own projects, since I prefer to look at the abstraction first, and implementation last. But I did note that in one or two projects, where I had a large number of instantiations, that the code size started to look rather large compared to the functionality that was being offered. This made me pause to consider the ramifications of this on a truly large project. I have also noted others mentioning similar concerns here. Obviously, this is a place where the compiler should be able to help, with the emphasis on "should". ;-) Warren.