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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,577c9f9c0cdd76d X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Confusing language, was Re: Help help.. please.i am totaly new in ada programing Date: 1999/11/12 Message-ID: <80habk$pq2$1@nnrp1.deja.com>#1/1 X-Deja-AN: 547752001 References: <7vqgs2$lcc$1@nnrp1.deja.com> <38233108.F3540F0@ebox.tninet.se> <806716$i6c2@ftp.kvaerner.com> <807109$8m0$1@nnrp1.deja.com> <38270DC7.86553BB1@pwfl.com> <38285C60.B3E2D2BC@pwfl.com> <809u91$3ik$1@nntp1.atl.mindspring.net> <80djdu$491$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x30.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Nov 12 15:05:28 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-12T00:00:00+00:00 List-Id: In article , Robert A Duff wrote: > I disagree. It is possible to define a binary representation > that is still standard and portable. Well that's pretty tricky, because of 1's complement vs 2's complement problems (a VERY VERY hot issue given the Univac/Unisys presence here -- you may remember that this fuss appeared even in the context of the Ada design years later), and because of the endianness issues (complicated by the Marc Williams patent). The fact that no language has done this (certainly Ada did not even attempt this) indicates that it is not trivial to do this at all. > For example, the standard stream data in Ada is > nowhere near being portable! > > Right, and I think that's bad. Well you certainly would not want to *mandate* that the stream format be portable (you will run into all kinds of difficulties if you do this, not least of which is serious inefficiencies on some machines). As you know, GNAT provides the option of using XDR for streams, which is useful in two contexts: 1. Allowing creation of distributed programs using Annex E facilities that allow mixed platform communication. 2. Implementing passive partitions (which in GNAT provide interprogram communication and persistence, as well as the standard Annex E uses) in a manner that is platform independent. For example, you can run a program on Solaris with a package full of data, and then when you later run a program referencing this same package on x86/Linux, you pick up the same data values that existed at he time of termination of the Solaris program. Both of which are really neat and useful features, but they come at quite a price in efficiency. P.S. I think it would be nice if other Ada 95 vendors would provide the option of using XDR for streams as well, allowing inter-compiler compatibility. Sent via Deja.com http://www.deja.com/ Before you buy.