comp.lang.ada
 help / color / mirror / Atom feed
From: Esa Pulkkinen <esap@cs.tut.fi>
Subject: Re: Ada to C++ Translators
Date: 1998/02/21
Date: 1998-02-21T00:00:00+00:00	[thread overview]
Message-ID: <6cn8lg$cao@netlab.cs.rpi.edu> (raw)
In-Reply-To: Pine.BSF.3.96.980218124258.25560A-100000@shell5.ba.best.com


[Sorry this is a bit off-topic for comp.lang.ada, so I'll crosspost and
put followups to comp.lang.c++.moderated.]

Brian Rogoff <bpr@shell5.ba.best.com> writes at comp.lang.ada:
> I'd be interested in hearing how a well designed Ada program that makes
> use of constrained genericity gets translated to a well designed C++
> program. I haven't been following the C++ standard for a while, but I
> thought that there was no constrained genericity in C++, and that the 
> work-arounds would not really be considered "well-designed".

See http://www.cs.tut.fi/~esap/instructive/ for one method for
converting a program which uses constrained genericity to C++ using
class template partial specialization. It uses class template partial
specialization to implement different versions of the class for the case
where the class is derived from another class, and for the case where it
isn't. I think it's as well-designed as it ever will without explicit
language support, but I'd like to hear your opinions.
-- 
   Esa Pulkkinen                        | C++ programmers do it virtually
   E-Mail:  esap@cs.tut.fi              | everywhere with class, resulting
   WWW   :  http://www.cs.tut.fi/~esap/ | in multiple inheritance.

      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]





  reply	other threads:[~1998-02-21  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-13  0:00 Ada to C++ Translators David Kusuda
1998-02-14  0:00 ` Larry Kilgallen
1998-02-16  0:00   ` David  Weller
1998-02-18  0:00     ` Jean D. Ichbiah
1998-02-18  0:00       ` David  Weller
1998-02-18  0:00         ` Brian Rogoff
1998-02-21  0:00           ` Esa Pulkkinen [this message]
1998-02-23  0:00             ` Brian Rogoff
1998-02-19  0:00         ` Jean D. Ichbiah
1998-02-19  0:00           ` Larry Kilgallen
1998-02-25  0:00         ` Scott Leschke
1998-02-25  0:00           ` David  Weller
1998-02-19  0:00       ` Delphi & Ada; Ada to C++ Nick Roberts
1998-02-19  0:00         ` David  Weller
1998-02-19  0:00           ` Nick Roberts
1998-02-19  0:00             ` Jon S Anthony
1998-02-20  0:00               ` Nick Roberts
1998-02-21  0:00                 ` Richard Kenner
1998-02-21  0:00                   ` Robert Dewar
1998-02-21  0:00           ` Simon Wright
1998-02-21  0:00             ` Richard Kenner
1998-03-05  0:00               ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox