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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!linus!linus!eachus From: eachus@linus.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: Ada portability Message-ID: Date: 19 Nov 90 23:19:53 GMT References: <901116180937.45k@sic.epfl.ch> Sender: usenet@linus.mitre.org Organization: The Mitre Corporation, Bedford, MA In-reply-to: MADMATS@ELCGL.EPFL.CH's message of 16 Nov 90 17:09:00 GMT List-Id: In article <901116180937.45k@sic.epfl.ch> MADMATS@ELCGL.EPFL.CH ("", Mats Weber) writes: We have had major problems in this area which until now have made it impossible to port some quite small applications from VAX Ada to Unix with ANY compiler available on Unix. In my opinion, the only two compilers I know that deserve the "validated" label are Rational and Vax Ada. Please!! If everyone is out of step but you, maybe you are the person who is out of step... More seriously, for many years there have been two "mechanisms" for implementing generics, and DEC has been the only major player using the generics as macros approach. I used to joke that (since I heavily use generics in my programs, and preferred Verdix for development) I had never written an Ada program that compiled and ran using the DEC compiler. This does not mean that my programs or the DEC compiler were not legal Ada, but that I kept running in to the Godel Incompleteness problem: (Godel translated: Any compiler for any useful language must either not accept all legal programs, or must accept some illegal programs.) A similar example is the way variant records are implemented. To simplify drastically, Alsys uses hidden pointers for records contaning unconstrained arrays, while Verdix uses allocates the maximum size. (Both compilers actually have available tuning parameters, and...) Well written programs will compile and run on both compilers without a hitch, but it is possible to construct programs which raise exceptions on one of the two but not the other when run. Is one implementation better than the other? Not in my opinion. With version 2.0,my understanding is that the DEC compiler is much closer to the generic "mainstream." However, DEC is obviously not going to intentionaly modify their compiler so that it refuses programs that it accepted previously, so it will probably be the case for a long time that programs will be harder to port from DEC to the rest of the world than vice-versa. Just so that you don't get the wrong idea from all of this, I have, as part of an evaluation of software capabilities, implemented a system (missing the body a generic package) and gone into a contractors facility and expected them to compile and execute my code with a body for the package supplied by them. In several cases, the system compiled, linked and executed test cases without one line of code changed. Note that I did not know which systems it would be compiled or run on when I wrote the code, and the (potential) contractors had not seen my code in advance (or for that matter before they ran it). And yes, when I tested my code, I explicitly tested it on several systems, and as expected from my personal experience, the only one which required signifcant modification was DEC Ada 1.5. I was able to come up with a DEC Ada and everybody else version. Note again, I'm am not saying that their impelmentation was wrong, illegal, or not Ada. It just required be to rein in my generic nesting style to comply with the limits of that implementation. -- Robert I. Eachus with STANDARD_DISCLAIMER; use STANDARD_DISCLAIMER; function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...