From: Simon Wright <simon@pushface.org>
Subject: Re: 64-bit integers in Ada
Date: 11 Aug 2002 16:32:44 +0100
Date: 2002-08-11T16:32:44+01:00 [thread overview]
Message-ID: <x7vptwp1kdf.fsf@pushface.org> (raw)
In-Reply-To: 3D4DE2C2.8A7674E6@adaworks.com
Richard Riehle <richard@adaworks.com> writes:
> Robert Dewar wrote:
>
> > First. I trust we all agree that new Ada code should
> > almost NEVER EVER use type Integer, except as the
> > index of the String type.
>
> Robert,
>
> We are in full agreement on all of the points you made.
>
> The only two uses of predefined type Integer are its
> requirement in the predefined String, and for occasional
> pedagogic purposes, and the latter use often leads to
> more trouble than it is worth.
Well, I think that when you are writing libraries you may find that
Integer, Natural and Positive have their uses. For example,
package Tables is
type Item_Array is array (Positive range <>) of Items.Item_Container;
type Value_Array is array (Positive range <>) of Values.Value_Container;
type Table (Number_Of_Buckets : Positive) is record
Items : Item_Array (1 .. Number_Of_Buckets);
Values : Value_Array (1 .. Number_Of_Buckets);
Size : Natural := 0;
end record;
.. it seems pointless to force the user to provide yet another
parameter to specify the type for Number_Of_Buckets.
I note also that GNAT.Dynamic_Tables has
generic
type Table_Component_Type is private;
type Table_Index_Type is range <>;
Table_Low_Bound : Table_Index_Type;
Table_Initial : Positive;
Table_Increment : Natural;
package GNAT.Dynamic_Tables is
next prev parent reply other threads:[~2002-08-11 15:32 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-16 11:27 64-bit integers in Ada David Rasmussen
2002-05-17 2:28 ` Robert Dewar
2002-05-17 13:56 ` Mark Johnson
2002-07-29 15:33 ` Victor Giddings
2002-07-29 20:15 ` Robert A Duff
2002-07-30 18:35 ` Richard Riehle
2002-07-30 20:20 ` Robert A Duff
2002-07-31 0:13 ` Robert Dewar
2002-07-31 4:17 ` Keith Thompson
2002-07-31 8:41 ` Larry Kilgallen
2002-07-31 13:20 ` Robert A Duff
2002-07-31 13:42 ` Marin David Condic
2002-08-01 7:54 ` Lutz Donnerhacke
2002-08-01 13:07 ` Marin David Condic
2002-08-02 7:31 ` Lutz Donnerhacke
2002-08-02 13:21 ` Marin David Condic
2002-08-03 12:24 ` Robert Dewar
2002-08-03 18:59 ` Richard Riehle
2002-08-04 6:12 ` Chad R. Meiners
2002-08-04 14:07 ` Robert Dewar
2002-08-05 2:28 ` Richard Riehle
2002-08-11 15:32 ` Simon Wright [this message]
2002-08-13 21:14 ` Randy Brukardt
2002-08-04 18:00 ` Larry Kilgallen
[not found] ` <5ee5b646.0208040607.ebb6909@posting.googOrganization: LJK Software <PG2KS5+doDWm@eisner.encompasserve.org>
2002-08-05 1:44 ` Robert Dewar
2002-08-05 1:48 ` Robert Dewar
2002-08-05 11:40 ` Marc A. Criley
2002-08-05 14:40 ` Pat Rogers
2002-08-05 2:34 ` Richard Riehle
2002-08-11 21:56 ` Robert A Duff
2002-08-13 21:09 ` Randy Brukardt
2002-08-18 1:01 ` AG
2002-08-20 0:15 ` Robert Dewar
2002-08-02 8:37 ` Fraser Wilson
2002-08-02 12:54 ` Frank J. Lhota
2002-08-01 11:57 ` Larry Kilgallen
2002-08-01 17:53 ` Ben Brosgol
2002-08-01 20:32 ` Keith Thompson
2002-07-31 21:50 ` Keith Thompson
2002-07-31 21:59 ` Robert A Duff
2002-07-30 4:29 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox