From: Michael Feldman Subject: Re: Templates again To: havemann AT uran DOT informatik DOT uni-bonn DOT de (Sven A. Havemann) Date: Wed, 21 Dec 1994 19:00:44 -0500 (EST) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu, havemann AT uran DOT informatik DOT uni-bonn DOT de > > We are trying to implement intricate portable data structures on a net of PCs, > Sun and SGI-machines. As we have many versions of gcc ranging from 2.5.8 to > 2.6.2 on different machines I am very interested in a > > template mechanism that works. At the risk of sending out flamebait or starting a language war, I'd like to suggest that you take a look at GNAT, the GNU-NYU Ada 95 Translator. What C++ calls "templates" have been stable in Ada for ten years; Ada 95 adds type extension and dynamic polymorphism for OO support. Exceptions, also a new feature in C++, has been standard in Ada as well. The Ada 95 standard has been approved by both ANSI and ISO, and is in the ISO publication pipeline. The standard is, and will continue to be, a freely available document; ASCII, PostScript, and html versions are available on the net (e-mail me for details). GNAT can be ftp-ed from cs.nyu.edu, directory pub/gnat; it uses the gcc backend and is really integrated into gcc. Ports are done by cross-compiling because GNAT is written in Ada 95 and not C. Ports currently exist for DOS, OS/2, SunOS, Solaris 2.x, Windows NT, Irix, etc.; the language supported is identical on all machines, of course. The current release shows some very interesting demonstrations of interoperability with C libraries and C++ classes; in particular, SGI has bought heavily into GNAT (both technically and financially) and has some very interesting Ada 95 and C++ things talking to each other. I saw some quite impressive 2-language virtual-reality stuff at SGI's exhibit at TRI-Ada in November. You could build your portable data structures with GNAT, calling - or being called by - C or C++ if necessary. Try it - you may like it! Further discussion welcome by e-mail; I won't take djgpp bandwidth on it unless there's a lot of interest. Cheers - Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman - chair, SIGAda Education Working Group Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5919 (voice) - 202-994-0227 (fax) - mfeldman AT seas DOT gwu DOT edu (Internet) ------------------------------------------------------------------------ Ada on the World-Wide Web: http://lglwww.epfl.ch/Ada/ ------------------------------------------------------------------------