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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Tue, 12 Sep 2017 11:23:25 +0200 Organization: A noiseless patient Spider Message-ID: References: <915874b5-52c0-4aa8-9023-82fddedb816f@googlegroups.com> <323ae5e6-f2ce-4a15-b874-906a670f331c@googlegroups.com> <35e49f52-16da-4f1a-b2e3-b8d07d736a0d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 12 Sep 2017 09:23:32 -0000 (UTC) Injection-Info: reader.eternal-september.org; posting-host="b26101ed9c6a4c0ef177067b68987246"; logging-data="1789"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18N6UBTBmA7y6e+/r6XBqu0" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 In-Reply-To: Content-Language: fr Cancel-Lock: sha1:rKRqwACOdLxqiyjY71T4PMzWUII= Xref: news.eternal-september.org comp.lang.ada:48043 Date: 2017-09-12T11:23:25+02:00 List-Id: Le 12/09/2017 à 09:15, Dmitry A. Kazakov a écrit : > Yes, bounded-length strings have no practical use in Ada. > > The reason for that is that differently to other languages Ada can > return fixed-length strings on the stack and can pass string slices down > where a fixed-length string is expected. This eliminates most of the > cases for bounded-length strings, the minuscule rest is handled by > Unbounded_Strings. > No, because Unbounded_Strings are just one type, while bounded strings create different types. The use of bounded length is when you have various types, implemented as strings. In a data base, you don't want an address to be the same type as a name, even if both are represented as strings. And objects have a variable length, with a maximum set by the constraints of the environment (usually a database). -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr