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,30352abc52760363 X-Google-Attributes: gid103376,public From: ichbiah@twsolutions.com (Jean D. Ichbiah) Subject: Re: Ada to C++ Translators Date: 1998/02/18 Message-ID: <34eb5d36.20077308@news.tiac.net>#1/1 X-Deja-AN: 326093884 Content-Transfer-Encoding: 7bit References: <34E47622.15EB@atc-1s.hac.com> <1998Feb13.213046.1@eisner> <6c9tjc$obg@universe.digex.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Textware Solutions Newsgroups: comp.lang.ada Date: 1998-02-18T00:00:00+00:00 List-Id: On 16 Feb 1998 12:38:52 -0500, dweller@universe.digex.net (David Weller) wrote: > In article <1998Feb13.213046.1@eisner>, > Larry Kilgallen wrote: > >In article <34E47622.15EB@atc-1s.hac.com>, David Kusuda writes: > >> I'm pretty sure that this has been discussed before, but can anyone > >> direct me towards an Ada to C++ translator? Any information would be > >> greatly appreciated. [...] > Let's save Mr. Kusuda a bag of time: > > 1) It can be done > 2) Over a lot of time > 3) With a lot of money > 4) Starting from scratch is MUCH cheaper > 5) It's a pretty dumb thing to do anyway > (It takes less code to do a project in Ada95 than in C++) Why so intolerant? Perhaps if you are asking about an automatic translator. But hand translation is possible. A well-designed Ada program will translate into a well-designed C++ program. (And a messy Ada program - I have seen some horrifying examples too - will convert into another mess.) In this context of hand translation: 1) is certainly true. 2) is incorrect. For a well designed program, it can be done in linear time. 3) is wrong. 4) is wrong also: why repeat the careful analysis done in the first place 5) is an academic assertion. Let me give an example: I am doing most of my development using Delphi. (More precisely, I program in Ada and use the Delphi compiler to compile them. :) Recently, however, I have been porting one of our applications to Windows CE for the Palm PC. While I wish a Delphi or Ada compiler had been available for this environment, there is none and I had to convert the program to C++. While there are certain irritating things with the arcane C syntax, I was able to produce something that was line per line (almost) parallel to the original. The namespace concept helped a lot. My impression of C++ is that it is a huge language and that you can easily get lost. But if you start from a clean model, it is easier to restrict yourself to a manageable subset. Jean Ichbiah Textware Solutions ichbiah@twsolutions.com http://www.twsolutions.com