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: 109fba,94a2b19e68586a6 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,9adfbb907494972e X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,9adfbb907494972e X-Google-Attributes: gid103376,public From: dweller@dfw.net (David Weller) Subject: Re: Ada to C/C++ translator needed Date: 1996/10/04 Message-ID: <53364e$lk1@dfw.dfw.net>#1/1 X-Deja-AN: 187523015 references: <32499FA0.4B5E@magic.fr> <52cdn6$iis@dfw.dfw.net> <3251C855.41C6@etek.chalmers.se> organization: DFWNet -- Public Internet Access newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1996-10-04T00:00:00+00:00 List-Id: In article <3251C855.41C6@etek.chalmers.se>, B|rje Norden wrote: >David Weller wrote: >> >> In article <32499FA0.4B5E@magic.fr>, >> Emmanuel Champommier wrote: >> >I'm looking for an Ada to C (or C++) translator. >> >Does anyone knows where I could find it ? > >> 2) None will likely ever exist (This is for various market >> reasons, as well as the fact that translating various Ada >> constructs, especially when used in combinations, would be >> literally impossible to translate (portably, or even >> semi-portably) into C _or_ C++) >Apart from ADA's multitasking features,most of the constructs in ADA/C++ >is actually quite similar (apart from syntax, that is...); I don't think >it would be too difficult to make an ADA to C++ converter if there was a >good way of handling the multitasking bits (ADA to C, on the other hand, >would be a nightmare to accomplish...;-)). And what do you mean by >various market reasons ? Please explain yourself. > What you probably saw was the old Meridian Ada compiler for MPW on the Mac. My memory is just as foggy :-), but I seem to recall there were a lot of little rules about what was, and was not, supported syntactically. I don't think any multitasking was supported. Perhaps somebody more familiar with that product could speak up. I do recall it had a very short life, however. As for "market reasons", there simply isn't any benefit. Quite frankly, the same market reasons apply in the reverse direction. The truth of the entire matter is this: Current and future languages will be noted more by how friendly they are to "foreign languages" than by how feature-laden they are. As software developers, we learn, more and more, that the world isn't monolingual when it comes to programming languages. I personally shift between Perl, Java, C++, and Ada almost every day (maybe in hopes that one of these days, Ada will recognize the $_ variable :-). I'm writing a C++ to Ada translator to reduce translation errors in migrating a series of software components. I have no hopes of selling it, but some people may find it useful for various reasons (some may be working to a demand to move from C++ to Ada, others may want to use it to help find weaknesses in the C++ typing model to improve their C++ code, and, what I REALLY hope it will be used for: people will have a tool that will help them start to objectively compare C++ and Ada) >> >> Good news (kind of): >> 1) A C to Ada traslator exists >> (http://www.inmet.com/~mg/c2ada/c2ada.html) >> 2) A C++ to Ada translator is in early prototype stages >This would be just as hard as ADA to C++... > Hmm...no, I don't think so, but it would be an excellent experiment for somebody to do (I'm keeping track of the time I apply to creating my converter, they're welcome to use that to compare level of effort, if nothing else). On the simplest level, the interaction between protected types, tasks, and controlled types in Ada would be VERY hard to duplicate through a converter. You'd have to have a non-trivial, portable library to support such a thing. I've yet to find a need to have _any_ such library/package for the C++ to Ada translation. And, of course, I have no desire to waste my time with an Ada to C++ translator (but if offered the right amount of money ... :-) -- Visit the Ada 95 Booch Components Homepage: www.ocsystems.com/booch This is not your father's Ada -- lglwww.epfl.ch/Ada