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!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: gnat.string_split , howto manipulate slice numbers Date: Thu, 31 Oct 2019 19:36:45 +0100 Organization: Adalog Message-ID: References: <5d710dac-d172-4a31-899e-1bf95e220ed6@googlegroups.com> <7fb6d1d0-18df-43b9-bcdc-9782dfb5171c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 31 Oct 2019 18:36:45 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="c4156dc9a6fbdf3cd2effc85c9b036f0"; logging-data="21432"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+T7JPcUaRI0IBQiKDT27h7" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cancel-Lock: sha1:WiGREHm1PzBxHYELU3ZE+YH3Qn4= In-Reply-To: Content-Language: fr Openpgp: preference=signencrypt Xref: reader01.eternal-september.org comp.lang.ada:57401 Date: 2019-10-31T19:36:45+01:00 List-Id: Le 31/10/2019 à 11:12, Dmitry A. Kazakov a écrit : > BTW, here come further issues why indexing by integer types is not so > good idea from the strong typing point of view. Arithmetic on indices > does not make sense, like adding or multiplying times does not. Except > some rare cases of low-level programming index arithmetic is an error. you can even declare: function "*" (L, R : T) return T is abstract; and thus forbid the use of multiplication when it does not make sense. Most programming languages praise what they allow to do; Ada is the only language that praises what it prevents from doing! -- 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