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: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public X-Google-Thread: 10db24,fec75f150a0d78f5 X-Google-Attributes: gid10db24,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada) Date: 1996/04/08 Message-ID: #1/1 X-Deja-AN: 146464103 references: <4k9qhe$65r@solutions.solon.com> <4kb2j8$an0@solutions.solon.com> <4kbrt5$k3h@mulga.cs.mu.OZ.AU> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu Date: 1996-04-08T00:00:00+00:00 List-Id: Peter said ">Something which works only on some systems is >not a portability problem *if there is no standard saying it works*. Likewise > i = ++i; >producing different results on different machines is not a "portability >problem"." This is a perfect case of Peter saying: Language X ensures that all portable programs are portable, therefore there are no portability problems. This is of course vacuously true for all languages! By a "portability problem" most people mean that you take a program written in language X, and try to move it to machine Y from machine Z, and it does not work any more. Portability problems are most definitely caused by writing non-portable code. In fact in the absence of errors in the compiler of environment on machine Y or machine Z, this is the ONLY source of portability problems. However, it is definitely the case that languages vary in the ease with which people end up writing non-portable code deliberately or accidentally. For example, in C, we can't declare an integer variable without introducing a potential portability dpeendence on the range. Careful writing can get around this, or certainly minimize it, but it's often the source of porability problems. Typical Ada prograns do not suffer from this particular problem, because even a novice Ada programmer knows to avoid the use of predefined types in code that is intended to be portable.