Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrcae!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.lang.misc Subject: Re: Relationship between C and C++ Message-ID: <8459@hubcap.clemson.edu> Date: 22 Mar 90 02:58:01 GMT References: Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 57 From article , by peter@ficc.uu.net (Peter da Silva): >> What is this wonderful "power" which C is giving me, which requires >> me to live with all the pitfalls? > > There are only two languages I know of in which you can take a moderately > complex program and run it, without modification, on a wide variety of > platforms. One is Fortran, with the Software Tools library. The other > is C... When I can take a 10 year old screen-oriented program written for > Version 7 UNIX and run it on an IBM-PC under MS-DOS, then take the same > source and compile and run it under both System V and BSD UNIX, it's going > to take more than theoretical arguments about safety to make me change. > It's going to take working code. For what other language can I get > compatible compilers for: UNIX, IBM-PC, Amiga, Atari ST, Macintosh, > RSX-11/M, VAX/VMS, RMX-86? Ada has validated compilers for a very wide variety of platforms, several hundred compilers in fact. I doubt that the Amiga and Atari are among them, due to their small size, but above a certain threshold Ada is pretty much universally available and almost totally portable. Due to the no-subsets, no-supersets policy, backed up by the compiler validation testing requirement, Ada software is highly portable. The main source of portability problems has been operating system-dependent things such as screen I/O, and the preferred technique has usually been to isolate such things in small, well-defined packages whose package body (implementation) is adapted to the new environment. But I know, you want total, don't-lift-a-finger portability. Well, so does the Ada community. And the result has been CAIS, the Common APSE Interface Set. There is now a process by which CAIS is being merged with PCTE, the European Portable Common Tool Environment (or words to that effect), and soon we will have a worldwide standard for the interface to operating system support facilities. There is also a validation system for CAIS which (the validation system) began formal testing in December 1989 and will soon be released. Combined with the Ada 9X move toward standardizing with respect to multinational character sets and the like, there should soon be a level of transportability which far exceeds that of C code. OK, but it's not here yet, you say... well, that's true. But there is relatively little difficulty associated with porting Ada systems now, and in my view the code engineering benefits associated with the Ada language far outweigh any minor, short-term porting adaptations which might be associated with linking to a particular operating system's screen I/O facilities. In case it's *that* important that you be able to not lift a finger, maybe it would indeed be best to wait a few years. If you want controlled studies on the performance of CAIS implementations on different platforms, add on a few more years. If you want to be able to get a free copy of CAIS for your machine as well, simply hold your breath until one becomes available. (Just kidding!!!) There does come a point, though, at which any particular aspect such as level of portability has to be considered in relation to other factors such as amount of reduction in the length of the testing phase -- 98% (vs. 100%) portability, combined with a steep reduction in testing and maintenance costs, is probably an extremely reasonable tradeoff to make. Bill Wolfe, wtwolfe@hubcap.clemson.edu