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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.222.169 with SMTP id qn9mr8711933pac.4.1447258129559; Wed, 11 Nov 2015 08:08:49 -0800 (PST) X-Received: by 10.182.227.200 with SMTP id sc8mr105832obc.10.1447258129318; Wed, 11 Nov 2015 08:08:49 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!i2no362749igv.0!news-out.google.com!l1ni881igd.0!nntp.google.com!i2no1876076igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 11 Nov 2015 08:08:49 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=109.88.54.35; posting-account=6m7axgkAAADBKh082FfZLdYsJ24CXYi5 NNTP-Posting-Host: 109.88.54.35 References: <7ba56b33-28d4-42d2-8b9b-5ad9f5beab8b@googlegroups.com> <87io597447.fsf@theworld.com> <66278720-249a-4191-a908-bb840e7f3ccc@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Bounded String question From: Serge Robyns Injection-Date: Wed, 11 Nov 2015 16:08:49 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28303 Date: 2015-11-11T08:08:49-08:00 List-Id: On Wednesday, 11 November 2015 15:32:03 UTC+1, brbar...@gmail.com wrote: =20 > Probably the sensible approach is not to expect Ada to act like C. I use > Bounded_Strings constantly and just expect to do the conversion from > Bounded_Strings to plain String (and back). It's a bit more verbose, but > that may just be one of the costs of strong typing. I'm not expecting Ada to act like C. What I'm confused about is that in on= e case I use To_String (any type derived from the P_String package) from th= e P_String package but not To_Bounded_String. Initially I wrote all the To= _Strings myself but then the compiler warned me about not defining them as = overriding. I don't mind the verbosity, otherwise I could have stayed with= C, java or why not even D on the contrary, this what attracted me to Ada. > I'd also note that P_String seems to be rather close to the type name one > would use in C for a pointer (or an access type in Ada). Personally, I'd > find that confusing. I do agree, well I use T_xyz_Access for access types. It happens that my ap= plication's name start with a 'P' and at the same time I'm instating a pack= age but I'll change this to something more expressive. Serge