Re: No call for Ada (was Re: Announcing new scripting/prototyping language)

From: Robert I. Eachus (rieachus_at_comcast.net)
Date: 02/12/04


Date: Wed, 11 Feb 2004 18:29:33 -0500

I wrote:

> After she hung up, what she had said percolated through my head, and I
> e-mailed a short Fortran example. Sure enough it produced garbage...

Hmmm. Trying to be terse, I may have inadvertantly slandered Fortran, or
the (intentionally unnamed) system vendor.

The bug had nothing to do with Fortran as such. The Fortran standard
was just aa clear as the Ada standard in this area. But the hardware
vendor was working on upgrading their compiler for new hardware with a
wider memory interface. So what Carol said on the phone bugged me until
I worked out an example that would determine whether there was a bug in
their compiler, or a misunderstanding. It turned out that the code
worked correctly on their existing hardware, but broke on the new
hardware. So she fixed the optimizer, and was able to share the code
between the Ada and Fortran front-ends. (Unless a user defined
floating-point type had explicit bounds. Then the Ada code would be
much slower, but you have to assume that the user did that intentionally.)

Incidently, I don't know why Ada compiler implementors picked me to call
with that sort of question. (Or maybe they called everyone looking for
an answer they liked to some questions.) There were three areas in the
Ada 83 standard where everyone who was working on an Ada compiler--and
wasn't represented on the then LMC (now ARG)--called me with the exact
same questions.

The simplest was described as "for I in -1..10 loop..." Yes, you were
expected to reject that at compile time. ("for I in Integer(-1)..10
loop..." was okay.) The second, was that yes it was intentional that
the size of record objects with discriminants could change at run-time,
but only if the discriminants had default values. And the final one was
that yes, elaboration of Ada generics happens at run-time not compile
time. This causes some major issues if you want to implement generics
as textual substitutions. Not that you can't do it, but there are some
things that you have to work pretty hard to get right.

I used to joke that I could tell how the vendors were doing on their
compilers by when they called. ;-)

-- 
                                           Robert I. Eachus
"The war on terror is a different kind of war, waged capture by capture, 
cell by cell, and victory by victory. Our security is assured by our 
perseverance and by our sure belief in the success of liberty." -- 
George W. Bush


Relevant Pages