From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,37b5f16b9be86fec X-Google-Attributes: gid103376,public From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: ada -> C translator Date: 1997/04/04 Message-ID: <5i243c$i1h@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 230585033 References: <33436B29.41C6@sema-grenoble.fr> Organization: Comp Sci, University of Melbourne Newsgroups: comp.lang.ada Date: 1997-04-04T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: >Bob Duff said > >< >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 | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.