comp.lang.ada
 help / color / mirror / Atom feed
From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: ada -> C translator
Date: 1997/04/04
Date: 1997-04-04T00:00:00+00:00	[thread overview]
Message-ID: <5i243c$i1h@mulga.cs.mu.OZ.AU> (raw)
In-Reply-To: dewar.860115718@merv


dewar@merv.cs.nyu.edu (Robert Dewar) writes:

>Bob Duff said
>
><<First, what do you want:
>
>1. Do you want it to handle the entire Ada language correctly?
>
>2. Do you want it to produce C that is understandable to humans (e.g. C
>programmers)?  (I.e. do you want a compiler that happens to produce C,
>and you'll maintain the Ada code, or do you want to throw away the Ada
>code, and maintain the C code?)
>
>3. Do you want the C code to be efficient?
>>>
>
>To this you should add a fourth question:
>
>4. Do you want the C code to be portable?
>
>If you get into the business of generating very low level C code, then
>it may well be highly target dependent (e.g. have made decisions about
>representation of primitive data items).

Yep, if you want efficiency, you may need to use machine-dependent
code.  However, you can get this without sacrificing portability
if you keep the less efficient but portable C code as a fallback.

	#if THIS_SYSTEM_SUPPORTS_IT
	... nonportable efficient code ...
	#else
	... portable but not-so-efficient code ...
	#endif

Of course, this assumes that the answer to question 2 was "no".

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.




  parent reply	other threads:[~1997-04-04  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-03  0:00 ada -> C translator Gabriel Monaton
1997-04-03  0:00 ` Robert A Duff
1997-04-03  0:00   ` Robert Dewar
1997-04-03  0:00     ` Robert Dewar
1997-04-04  0:00     ` Fergus Henderson [this message]
1997-04-04  0:00       ` Robert Dewar
1997-04-05  0:00         ` Fergus Henderson
1997-04-06  0:00           ` Robert Dewar
1997-04-07  0:00             ` Fergus Henderson
1997-04-07  0:00               ` Robert Dewar
1997-04-08  0:00                 ` Fergus Henderson
1997-04-08  0:00                   ` Robert Dewar
1997-04-08  0:00                     ` William Clodius
1997-04-09  0:00                     ` Fergus Henderson
1997-04-09  0:00                       ` William Clodius
1997-04-09  0:00                       ` Robert Dewar
1997-04-09  0:00                         ` Fergus Henderson
1997-04-09  0:00                           ` Robert Dewar
1997-04-10  0:00                             ` Fergus Henderson
1997-04-08  0:00                 ` Richard A. O'Keefe
1997-04-08  0:00                   ` Robert Dewar
1997-04-08  0:00                   ` William Clodius
1997-04-09  0:00                     ` Fergus Henderson
1997-04-04  0:00       ` Richard Kenner
1997-04-05  0:00         ` Fergus Henderson
1997-04-04  0:00     ` Larry Kilgallen
1997-04-04  0:00       ` Robert Dewar
1997-04-05  0:00         ` Larry Kilgallen
1997-04-06  0:00           ` Robert Dewar
     [not found] ` <lvlo6iwws8.fsf@sulu.fl.ensco.com>
1997-04-17  0:00   ` Lance Kibblewhite
replies disabled

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