From: "Brian G. Holmes" <brian.holmes@gsc.gte.com>
Subject: Re: Language Translators
Date: 1997/08/05
Date: 1997-08-05T00:00:00+00:00 [thread overview]
Message-ID: <33E74536.7B37@gsc.gte.com> (raw)
In-Reply-To: dewar.870525538@merv
Robert Dewar wrote:
>
> Brian says
>
> <<If you can compile that C code as C++ then we have a translator that can
> 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
next prev parent reply other threads:[~1997-08-05 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-31 0:00 Language Translators cheryl.coen
1997-08-01 0:00 ` Brian G. Holmes
1997-08-02 0:00 ` Robert Dewar
1997-08-05 0:00 ` Brian G. Holmes [this message]
1997-08-01 0:00 ` Brian G. Holmes
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox