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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9e5bc907307a38f7 X-Google-Attributes: gid103376,public From: "Brian G. Holmes" Subject: Re: Language Translators Date: 1997/08/05 Message-ID: <33E74536.7B37@gsc.gte.com>#1/1 X-Deja-AN: 262477172 X-Nntp-Posting-Host: fp03-206.rtp.gtegsc.com Sender: news@wlbr.iipo.gtegsc.com (Steven M. Schultz) References: <870379932.5273@dejanews.com> <33E1FF19.1722@gsc.gte.com> X-Complaints-To: Email news@wlbr.iipo.gtegsc.com if this posting is inappropriate X-Trace: wlbr.iipo.gtegsc.com 870790805 2806 (None) [192.133.124.206] Organization: GTE Government Systems Reply-To: brian.holmes@gsc.gte.com Newsgroups: comp.lang.ada Date: 1997-08-05T00:00:00+00:00 List-Id: Robert Dewar wrote: > > Brian says > > < convert it to Ada95. Most C code will compile using a C++ compiler. > When one says Ada I assume that the subject is Ada95 these days. The > Ada95 produced by our translator might vary from one that produced Ada > from C code; the translation of a struct to an extendible type, for > example. Those variances would represent the C++ improvements made to > C, so they might be helpful to those who enhance or maintain the Ada > code. > >> > > I hope you don't translate *all* structs to tagged types, this would be > an inappropriate choice. All structs with non-private constructors may be created and extended. A strict translation would have to support extension for all of those structs. The translator cannot make subjective decisions regarding whether or not a specific struct should or should not be extended. As such, a translation based on a tagged type is the appropriate translation. We have chosen to base our class and struct translations on controlled types. The advantages of such a translation are many, and include strong support for the translation of constructors and destructors. The disadvantages of such a translation include the fact that we will be unable to limit the creation and extension of all structs and classes in the same way that a private constructor does. BGH