comp.lang.ada
 help / color / mirror / Atom feed
From: Eric Hughes <eric.eh9@gmail.com>
Subject: Re: Ada.Strings.Bounded
Date: Sun, 13 Apr 2008 09:53:16 -0700 (PDT)
Date: 2008-04-13T09:53:16-07:00	[thread overview]
Message-ID: <5d94b37c-20cd-46cf-b4c9-94bd2047c438@b5g2000pri.googlegroups.com> (raw)
In-Reply-To: 480111a5$0$23695$9b4e6d93@newsspool2.arcor-online.net

On Apr 12, 1:46 pm, Georg Bauhaus <rm.tsoh.plus-
bug.bauh...@maps.futureapps.de> wrote:
> The fixed String is an array, a basic and central piece of Ada.
> Unbounded_String is not an array.

Sure, you can have your array; I have no issue at all with that.  But
Ada.Strings.String is just not a string, not in the way it does
padding, not in its absence of concatenation.

> Both types use the word "string" in their name, which is
> unfortunate.

I consider it more than unfortunate.  I consider it just plain wrong.


> Seen from this point of view, a more general question is,
> do we have standard ways of converting between arrays and lists?
> Should these conversions be captured by some "predefined" notion
> of universal_array?

No.  But this answer is one that hinges on the specifics of the
question, not on generalities.  Arrays have a fixed number of
elements; lists do not.  This is more than a matter of
implementation.  It's a question of specification.

Now these two types do share the property that they are indexable.  A
proper set of universal declarations should be able to capture this
similarity.  This requires a partial specification, in my view, and
that subject is beyond the scope of this message, except to say that
partial specifications and universal types are orthogonal concepts.

Hidden in your question, though, is another issue.  I don't believe
that conversions should be automatic.  I believe they should be
explicitly declared and explicitly defined.

> Unfortunately, programming always deals with storage, memory,
> and times, in particular when a systems programming language
> like Ada is used, and when credit is given to the fact that
> programs mean operations of a computer with storage cells,
> instructions, and clock ticks. I can imagine values of some
> underlying universal_array as part of a nice clean
> ivory tower model of mathematical reductionism. Nasty real
> world computers ;)

There's a pattern in dealing with this issue that deserves
standardization with respect to universal types.
   -- When return is ordinary, then the result adheres to the
universal definition.
   -- When return is exceptional, then there is no requirement that
there's any adherence.
Thus exceptions kick you out of the mathematical assumptions into the
real world, and they do so in a reasonably controlled way.

Eric




  reply	other threads:[~2008-04-13 16:53 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 22:44 Untyped Ada? Phaedrus
2008-04-01  0:16 ` Randy Brukardt
2008-04-01  7:19 ` tmoran
2008-04-01  7:44 ` Dmitry A. Kazakov
2008-04-01  8:28 ` Jean-Pierre Rosen
2008-04-01 21:44   ` Phaedrus
2008-04-01 21:51     ` Ludovic Brenta
2008-04-01 17:09 ` Pascal Obry
2008-04-01 22:00   ` Phaedrus
2008-04-02  7:31     ` Dmitry A. Kazakov
2008-04-04 15:16     ` Graham
2008-04-04 16:10       ` Pascal Obry
2008-04-04 21:09         ` Ada.Bounded_Strings Adam Beneschan
2008-04-04 21:15           ` Ada.Strings.Bounded Adam Beneschan
2008-04-05  4:39             ` Ada.Strings.Bounded Gautier
2008-04-05  9:43               ` Ada.Strings.Bounded Pascal Obry
2008-04-05 10:10                 ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-05 11:36                 ` Ada.Strings.Bounded Gautier
2008-04-05 12:14                   ` Ada.Strings.Bounded Pascal Obry
2008-04-06  0:31                     ` Ada.Strings.Bounded Randy Brukardt
2008-04-07 14:57                       ` Ada.Strings.Bounded Adam Beneschan
2008-04-07 15:23                         ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-07 16:34                         ` Ada.Strings.Bounded stefan-lucks
2008-04-07 17:34                           ` Ada.Strings.Bounded (see below)
2008-04-12 18:50                 ` Ada.Strings.Bounded Eric Hughes
2008-04-12 19:46                   ` Ada.Strings.Bounded Georg Bauhaus
2008-04-13 16:53                     ` Eric Hughes [this message]
2008-04-13 20:10                       ` Ada.Strings.Bounded Robert A Duff
2008-04-13 23:52                         ` Ada.Strings.Bounded Eric Hughes
2008-04-14  8:00                           ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-14 15:25                             ` Ada.Strings.Bounded Eric Hughes
2008-04-14 18:36                               ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-15  1:39                                 ` Ada.Strings.Bounded Eric Hughes
2008-04-12 21:09                   ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-13 16:31                     ` Ada.Strings.Bounded Eric Hughes
2008-04-13 20:02                       ` Ada.Strings.Bounded Robert A Duff
2008-04-13 23:20                         ` Ada.Strings.Bounded Eric Hughes
2008-04-14  9:07                           ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-14 15:50                             ` Ada.Strings.Bounded Eric Hughes
2008-04-14 18:52                               ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-15  2:07                                 ` Ada.Strings.Bounded Eric Hughes
2008-04-15  8:02                                   ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-15 14:20                                     ` Ada.Strings.Bounded Eric Hughes
2008-04-15 15:23                                       ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-16  2:51                                         ` Ada.Strings.Bounded Eric Hughes
2008-04-16  8:00                                           ` Ada.Strings.Bounded Dmitry A. Kazakov
     [not found]                                     ` <bc3a8b4e-63fe-47a6-b10b-7056f6d7d586@w5g2000prd.googlegroups.com>
2008-04-15 14:58                                       ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-16  2:46                                         ` Ada.Strings.Bounded Eric Hughes
2008-04-16  8:16                                           ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-16 14:40                                             ` Ada.Strings.Bounded Eric Hughes
2008-04-16 18:28                                               ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-21  0:44                                                 ` Ada.Strings.Bounded Eric Hughes
2008-04-21 14:08                                                   ` Ada.Strings.Bounded Robert A Duff
2008-04-21 16:35                                                     ` Ada.Strings.Bounded Eric Hughes
2008-04-21 18:04                                                       ` Ada.Strings.Bounded Robert A Duff
2008-04-22  0:19                                                         ` Ada.Strings.Bounded Eric Hughes
2008-04-22  0:49                                                           ` Ada.Strings.Bounded Adam Beneschan
2008-04-22  1:02                                                             ` Ada.Strings.Bounded Adam Beneschan
2008-04-22 15:30                                                               ` Ada.Strings.Bounded Eric Hughes
2008-04-22 16:08                                                                 ` Ada.Strings.Bounded Robert A Duff
2008-04-22 15:25                                                             ` Ada.Strings.Bounded Eric Hughes
2008-04-22 15:54                                                               ` Ada.Strings.Bounded Robert A Duff
2008-04-22 15:41                                                           ` Ada.Strings.Bounded Robert A Duff
2008-04-22 17:49                                                             ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-22 18:26                                                               ` Ada.Strings.Bounded Samuel Tardieu
2008-04-22 18:59                                                                 ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-22 18:47                                                             ` Ada.Strings.Bounded Eric Hughes
2008-04-22 19:19                                                               ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-22 19:41                                                               ` Ada.Strings.Bounded Robert A Duff
2008-04-22 22:55                                                                 ` Ada.Strings.Bounded Eric Hughes
2008-04-23  6:40                                                                   ` Ada.Strings.Bounded christoph.grein
2008-04-23  6:54                                                                     ` Ada.Strings.Bounded christoph.grein
2008-04-23 10:42                                                                 ` Ada.Strings.Bounded Georg Bauhaus
2008-04-23 12:32                                                                   ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-23 12:52                                                                   ` Ada.Strings.Bounded christoph.grein
2008-04-23 13:34                                                                     ` Ada.Strings.Bounded Georg Bauhaus
2008-04-23 15:12                                                                   ` Ada.Strings.Bounded Adam Beneschan
2008-04-23 15:36                                                                     ` Ada.Strings.Bounded (see below)
2008-04-23 17:09                                                                     ` Ada.Strings.Bounded Ray Blaak
2008-04-24  0:29                                                                   ` Ada.Strings.Bounded Randy Brukardt
2008-04-22 20:15                                                               ` Ada.Strings.Bounded Adam Beneschan
2008-04-23 13:14                                                                 ` Ada.Strings.Bounded Peter Hermann
2008-04-23 14:40                                                                   ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-23 15:03                                                                     ` Ada.Strings.Bounded Adam Beneschan
2008-04-22 19:56                                                             ` Ada.Strings.Bounded Adam Beneschan
2008-04-21 18:50                                                       ` Ada.Strings.Bounded Dmitry A. Kazakov
2008-04-22  0:31                                                         ` Ada.Strings.Bounded Eric Hughes
2008-04-14 15:11                   ` Ada.Strings.Bounded Adam Beneschan
2008-04-14 16:09                     ` Ada.Strings.Bounded Eric Hughes
2008-04-14 18:13                       ` Ada.Strings.Bounded Georg Bauhaus
2008-04-15  1:35                         ` Ada.Strings.Bounded Eric Hughes
2008-04-15 20:33                           ` Ada.Strings.Bounded Georg Bauhaus
2008-04-16  3:11                             ` Ada.Strings.Bounded Eric Hughes
2008-04-04 23:35           ` Ada.Bounded_Strings Robert A Duff
2008-04-05  1:46             ` Ada.Bounded_Strings Adam Beneschan
2008-04-05  4:55               ` Ada.Bounded_Strings Randy Brukardt
2008-04-05  7:30                 ` Ada.Bounded_Strings Dmitry A. Kazakov
2008-04-06  0:44                   ` Ada.Bounded_Strings Randy Brukardt
2008-04-04 16:18       ` Untyped Ada? Adam Beneschan
2008-04-04 16:32       ` DScott
2008-04-04 17:38       ` Dmitry A. Kazakov
2008-04-04 18:52         ` Georg Bauhaus
2008-04-05  8:07           ` Dmitry A. Kazakov
2008-04-04 19:14         ` Graham
2008-04-04 21:06           ` tmoran
2008-04-05  8:44           ` Dmitry A. Kazakov
2008-04-12 16:50       ` Eric Hughes
2008-04-04 18:02     ` adaworks
replies disabled

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