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,5117b1b6391a0e06 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: A simple ADA puzzle (I haven't the answer) Date: Thu, 17 Jun 2004 10:06:21 +0200 Message-ID: References: <1087410710.477506@master.nyc.kbcfp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de KuLm8VNJT1AKf6Yu33nynAIG5u6qqc5Jnh/tjVqPVrMwzMtEs= X-Newsreader: Forte Agent 1.8/32.548 Xref: g2news1.google.com comp.lang.ada:1606 Date: 2004-06-17T10:06:21+02:00 List-Id: On Wed, 16 Jun 2004 14:31:50 -0400, Hyman Rosen wrote: >Frank J. Lhota wrote: >> The problem with your definition of String_Type > >I don't know if you've been following the Improving Ada's >Image thread, but this is a perfect illustration of what I >said there - trying to handle strings in Ada is a nightmare >if you don't understand a lot about arrays and types and >constraints. If a programmer does not understand what are arrays, types and constraints, then probably he/she should look for other job, probably as a dish-washer? As for Ada strings, there are only two problems related: 1. The default values for discriminants shall not have any implicit effects on the memory allocation policy. That was a mistake of Ada 83. 2. Unbounded_String and Bounded_String are nasty patches, which should be replaced when Ada will finally have a common supertype for all types strings. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de