comp.lang.ada
 help / color / mirror / Atom feed
From: Stefan Helfert <helfert@galileo.mpi-hd.mpg.de>
Subject: Re: Ada --> C Translation, was: Win CE target
Date: 1998/09/28
Date: 1998-09-28T00:00:00+00:00	[thread overview]
Message-ID: <360FB3B0.5B0E218C@galileo.mpi-hd.mpg.de> (raw)
In-Reply-To: 6u6flv$qn7$1@nnrp1.dejanews.com

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.

Clearly this is a statement that you cannot argue with.  

But I am tempted to add that the C preprocessor features clearly help to
add readability to a certain degree.  One of my projects some time ago
was a ML2C-translator, where we wanted to preserve "style" (not only
readability).  Now ML covers, as you may know, most of the language
features that Ada sports (especially those mentioned above) and adds
more (famous: garbage collection).  And ML as a functional language is
relying on a different programming paradigm.

The C preprocessor did really help a lot: E.g., you can implement
exceptions with setjmp/longjmp and hide this before the users' eyes, or
hide the interface to the garbage collector/memory management.


Stefan Helfert




  reply	other threads:[~1998-09-28  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 ` dewarr
1998-09-20  0:00 ` dewarr
1998-09-20  0:00 ` Tucker Taft
1998-09-21  0:00   ` dennison
1998-09-21  0:00     ` dewarr
1998-09-28  0:00       ` Stefan Helfert [this message]
1998-09-29  0:00         ` Ada --> C Translation, was: " Tucker Taft
1998-09-30  0:00           ` dewarr
1998-09-29  0:00         ` Robert A Duff
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                     ` Larry Kilgallen
1998-10-13  0:00                       ` dennison
1998-10-12  0:00                     ` Niklas Holsti
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                     ` dennison
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                     ` 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-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-23  0:00 ` Win CE target 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