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: fc772,638fa84e87ee92f3,start X-Google-Attributes: gidfc772,public X-Google-Thread: 103376,30352abc52760363 X-Google-Attributes: gid103376,public From: Esa Pulkkinen Subject: Re: Ada to C++ Translators Date: 1998/02/21 Message-ID: <6cn8lg$cao@netlab.cs.rpi.edu>#1/1 X-Deja-AN: 327321808 Sender: cppmods@netlab.cs.rpi.edu References: <34E47622.15EB@atc-1s.hac.com> <1998Feb13.213046.1@eisner> <6c9tjc$obg@universe.digex.net> <34eb5d36.20077308@news.tiac.net> <6ceq7m$3nc@universe.digex.net> X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Original-Date: 21 Feb 1998 01:29:10 +0200 Followup-To: comp.lang.c++.moderated Originator: cppmods@hpcll178.cup.hp.com Organization: Tampere University of Technology (CS) Newsgroups: comp.lang.ada,comp.lang.c++.moderated Date: 1998-02-21T00:00:00+00:00 List-Id: [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 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! ]