comp.lang.ada
 help / color / mirror / Atom feed
From: Serge Robyns <serge.robyns@gmail.com>
Subject: Re: Bounded String question
Date: Wed, 11 Nov 2015 08:08:49 -0800 (PST)
Date: 2015-11-11T08:08:49-08:00	[thread overview]
Message-ID: <e13373c9-5d93-4dae-b9de-539200de85a3@googlegroups.com> (raw)
In-Reply-To: <b1b12b02-7afc-4425-82bc-590e005a1749@googlegroups.com>

On Wednesday, 11 November 2015 15:32:03 UTC+1, brbar...@gmail.com  wrote:
 
> 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 one case I use To_String (any type derived from the P_String package) from the 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 application's name start with a 'P' and at the same time I'm instating a package but I'll change this to something more expressive.

Serge

  reply	other threads:[~2015-11-11 16:08 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 22:00 Bounded String question Serge Robyns
2015-11-11  0:48 ` Bob Duff
2015-11-11  2:01   ` Jeffrey R. Carter
2015-11-11 15:34     ` Bob Duff
2015-11-11 17:36       ` Jeffrey R. Carter
2015-11-11 19:22         ` Bob Duff
2016-03-06 18:59       ` Xavier Petit
2016-03-07 23:16         ` Randy Brukardt
2016-03-08  0:08           ` Jeffrey R. Carter
2016-03-09  1:18             ` Randy Brukardt
2015-11-11 10:52   ` Serge Robyns
2015-11-11 13:43     ` Serge Robyns
2015-11-11 14:32       ` brbarkstrom
2015-11-11 16:08         ` Serge Robyns [this message]
2015-11-11 17:27       ` Jeffrey R. Carter
2015-11-11 20:06         ` Serge Robyns
2015-11-11 20:23           ` AdaMagica
2015-11-11 20:27             ` AdaMagica
2015-11-11 20:32             ` Serge Robyns
2015-11-11 20:40               ` AdaMagica
2015-11-12 17:31                 ` Serge Robyns
2015-11-12 19:10                   ` AdaMagica
2015-11-12 21:29                     ` Randy Brukardt
2015-11-12 18:03                 ` G.B.
2015-11-12 18:13                   ` Serge Robyns
2015-11-12 18:14                     ` Serge Robyns
2015-11-12 19:37                   ` Randy Brukardt
2015-11-11 20:42           ` Jeffrey R. Carter
2015-11-12 16:59             ` Serge Robyns
2015-11-12 18:39               ` Jeffrey R. Carter
2015-11-12 21:19                 ` Randy Brukardt
2015-11-12 21:27               ` Randy Brukardt
2015-11-12 22:32                 ` Jeffrey R. Carter
2015-11-13  0:07                   ` Randy Brukardt
2015-11-13  1:01                     ` Jeffrey R. Carter
2015-11-11 15:41     ` Bob Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox