comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Ada --> C Translation, was: Win CE target
Date: 1998/09/29
Date: 1998-09-29T00:00:00+00:00	[thread overview]
Message-ID: <wcck92nbxdh.fsf@world.std.com> (raw)
In-Reply-To: 360FB3B0.5B0E218C@galileo.mpi-hd.mpg.de

Stefan Helfert <helfert@galileo.mpi-hd.mpg.de> writes:

> dewarr@my-dejanews.com wrote:
> [...]
> > Some of the trouble areas in compiling into C are
> > 
> >   1. Arithmetic overflow checks, especially in complex
> >      expressions, which have to be broken down into steps
> >      or written in prefix notation.
> > 
> >   2. Nested procedures, and particularly nested procedures
> >      with complex local declarations.
> > 
> >   3. Subunits (hard to do anything other than create a huge
> >      source in which the subunits are substituted).
> > 
> >   4. Exceptions
> > 
> [...]
> > I will say for the record, that, according to MY definition
> > of readability, it is not possible to translate Ada 95 into
> > readable C in all cases.

What's YOUR definition of "readability"?

A master C programmer doesn't have access to any of the features
mentioned above (eg nested procedures), either.  So of COURSE a program
that could benefit from nested procedures will be more readable in Ada
than in C (eg maybe the C code will have to pass extra bogus parameters,
or whatever).

Of course an automatic translator can't use nested procedures either.
Or subunits.  Or tasks.  Or whatever.

But, given an automatic translator from Ada to C, one ought to measure
the readability of the translator output with respect to hand-written C
code.  Given that the hand-written C code can't do (say) exceptions in
any direct way, why should one complain when the output of the
Ada-to-C translator can't do it directly?

In other words, we shouldn't complain if the generated C code is less
readable than the Ada code; we should only complain if the generated C
code is less readable than typical hand-written C code.

- Bob
-- 
Change robert to bob to get my real email address.  Sorry.




  reply	other threads:[~1998-09-29  0:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-20  0:00 Win CE target William A Whitaker
1998-09-20  0:00 ` Tucker Taft
1998-09-21  0:00   ` dennison
1998-09-21  0:00     ` dewarr
1998-09-28  0:00       ` Ada --> C Translation, was: " Stefan Helfert
1998-09-29  0:00         ` Robert A Duff [this message]
1998-10-10  0:00           ` Dr Amirez
1998-10-11  0:00             ` Dale Stanbrough
1998-10-10  0:00               ` Dr Amirez
1998-10-11  0:00                 ` Dale Stanbrough
1998-10-11  0:00                   ` Dr Amirez
1998-10-12  0:00                     ` Niklas Holsti
1998-10-12  0:00                     ` Larry Kilgallen
1998-10-13  0:00                       ` dennison
1998-10-12  0:00                 ` dennison
1998-10-12  0:00                   ` Larry Kilgallen
1998-10-14  0:00                   ` dewarr
1998-10-14  0:00                     ` Andi Kleen
1998-10-12  0:00                 ` PC
1998-10-12  0:00                   ` Operating System in Ada (was Ada --> C Translation) Larry Kilgallen
1998-10-12  0:00                     ` Tom Moran
1998-10-12  0:00                       ` Brian Rogoff
1998-10-13  0:00                         ` dennison
1998-10-13  0:00                           ` Brian Rogoff
1998-10-13  0:00                       ` Tucker Taft
1998-10-12  0:00                     ` Chris Morgan
1998-10-13  0:00                       ` Larry Kilgallen
1998-10-13  0:00                       ` Dale Stanbrough
1998-10-14  0:00                       ` dewarr
1998-10-12  0:00                     ` dennison
1998-10-21  0:00                     ` Van Snyder
1998-10-22  0:00                       ` Tom Moran
1998-10-13  0:00             ` Ada --> C Translation, was: Win CE target Robert I. Eachus
1998-10-14  0:00               ` Samuel Mize
1998-10-16  0:00                 ` Tasking/blocking system calls (was: Ada --> C Translation) Mats Weber
1998-09-29  0:00         ` Ada --> C Translation, was: Win CE target Tucker Taft
1998-09-30  0:00           ` dewarr
1998-09-20  0:00 ` dewarr
1998-09-20  0:00 ` dewarr
1998-09-23  0:00 ` falis
replies disabled

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