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=unavailable autolearn_force=no version=3.4.4 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: What do you think about this? Date: Fri, 03 Jul 2015 10:46:24 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <9894cde7-2cf8-4060-be65-857812ad7b09@googlegroups.com> <17436268-aceb-461f-bdcf-eee8436cd0e6@googlegroups.com> <86y4jaqzdx.fsf@stephe-leake.org> <86oak5qulb.fsf@stephe-leake.org> <86k2usq66p.fsf@stephe-leake.org> <864mllqv7c.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Fri, 3 Jul 2015 17:45:03 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a3855fbfe1a666be9aefba0563039ed5"; logging-data="16294"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jvPdbEIP+ruWKyR0r8i9kbIQFUSKehxg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: Cancel-Lock: sha1:9N79Czq2PbINccfAlrV6DwBziqg= Xref: number.nntp.giganews.com comp.lang.ada:193891 Date: 2015-07-03T10:46:24-07:00 List-Id: On 07/03/2015 10:11 AM, Laurent wrote: > On Friday, 3 July 2015 14:31:05 UTC+2, Stephen Leake wrote: > >> He should not be using a bounded string type; that's the point. >> >> Using a bounded string always involves a hidden length limit; if it's >> too small, you'll hit it sometime, if it's too big, you're wasting storage. >> >> -- >> -- Stephe > > So you mean that I should do it using something like this? Is an example from my Ada 95 book. No, he means he doesn't like bounded strings. There are times when bounded strings are appropriate. If you're happy with your use of them, then there's no reason not to use them. If you're not happy, use Ada.Strings.Unbounded.Unbounded_String. -- Jeff Carter "I feel as though somebody stepped on my tongue with muddy feet." Never Give a Sucker an Even Break 112