From: adacrypt <austin.obyrne@hotmail.com>
Subject: Re: Banging the Ada Drum.
Date: Tue, 28 Feb 2012 03:30:43 -0800 (PST)
Date: 2012-02-28T03:30:43-08:00 [thread overview]
Message-ID: <8893fdc4-ea96-4abc-bc01-cefdeec48e2e@l7g2000vbw.googlegroups.com> (raw)
In-Reply-To: 83178b55-da15-421a-9747-451db4e495c0@cj6g2000vbb.googlegroups.com
On Feb 28, 10:49 am, Martin <mar...@thedowies.com> wrote:
> On Feb 28, 9:39 am, adacrypt <austin.oby...@hotmail.com> wrote:
> [snip]
>
> FOR I in 30 ..1030 LOOP
> A(I) := Alices_Digital_Signature.GetUnits(Numin => I);
> B(I) := Alices_Digital_Signature.GetUnits(Numin => I);
> END LOOP;
>
> Don't explicitly re-use the array limits in loops, prefer:
>
> for I in A'Range loop
> A (I) := ...
>
> Now the compiler may not inject checks on "A (I)" as it knows that the
> range of "I" is derived directly from "A".
>
> Why have different types for A and B - they are both just arrays of
> Integer with the same index. If you really want to make them
> different, you could do:
>
> type Index is range 30 .. 1_030;
> type A_Array_Type is array (Index) of Integer;
> type B_Array_Type is new A_Array_Type;
>
> A : A_Array_Type;
> B : B_Array_Type;
>
> BTW, are you assuming Integer is 32-bits? Because it doesn't have to
> be...it could be as small as 16 bits or larger than 32.
>
> -- Martin
Your'e missing the point - this is not a fine piece of programming in
Ada - I hold my hands up in that respect - this work has been wrested
with blood sweat and tears from a world of resistance and
intransigence in the crypto scene - writing great Ada is another and
quite different playing field - I am not averse to that but I say
keeping one's eye on the ball of simplicity is paramount.
There are millions of people out there who can write great Ada -
nobody apart from me can write great cryptography.
Thanks for your well meant comments. I appreciate your reply.
- adacrypt
next prev parent reply other threads:[~2012-02-28 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 9:39 Banging the Ada Drum adacrypt
2012-02-28 10:40 ` Martin
2012-02-28 10:49 ` Martin
2012-02-28 11:30 ` adacrypt [this message]
2012-02-28 11:49 ` adacrypt
2012-02-28 13:26 ` Martin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox