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: 10261c,90121986704b5776 X-Google-Attributes: gid10261c,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: fdb77,4873305131bf4d94 X-Google-Attributes: gidfdb77,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 10c950,90121986704b5776 X-Google-Attributes: gid10c950,public From: "Rud Merriam" Subject: Re: ADA and Pascal SUCK, C,C++, and Java are the only languages you need!! Date: 1997/11/04 Message-ID: #1/1 X-Deja-AN: 287182794 X-Nntp-Posting-Host: curmudgeon.wins.compaq.com Sender: news@twisto.eng.hou.compaq.com (System Administrator) References: <34557f2b.1934172@news.mindspring.com><34566fe9.447229@news.mindspring.com><345673af.1413708@news.mindspring.com> <3456b9f3.0@news.eznet.net><3456e71b.3833189@news.mindspring.com><3459AC95.1D75@dynamite.com.au> X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Compaq Computer Corp. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.java.advocacy,comp.lang.pascal.ansi-iso,comp.lang.pascal.misc Date: 1997-11-04T00:00:00+00:00 List-Id: Jon S Anthony wrote in message ... >Alan E & Carmel J Brain writes: > >> C and C++ compilers differ by so much that porting is often a Nightmare. >> Before I get flamed, I'd like to talk to people who've actually ported >> code cross-platform. > >That's about right. Porting anything of substance written in C even >between compilers on the _same_ platform is depressing. FOE here... Gee, I guess that C satellite communications system I designed in the late 80's must not have been as well done as I thought. There were three components for the system. Each would run on a PC using Borland C and on the target system cross-compiled C to a 6809. The trick - cross-compile and test frequently and often. To write portable code you have to start with that goal in mind. > >> In my own, albeit limited experience, the problems I've had with any >> C or C++ port are greater than all the problems I've had with Ada >> crossplatform put together! > >That rings true as well. Typically porting Ada code between platforms >or compilers amounts to a recompilation. I have a C++ app that is intended to be portable. We are currently having problems with STL because the first pass is in VC++ using that STL which is pretty close to the standard draft. But once we can get an STL that works with the other compilers (Watcom for one) I expect 80% or more of the code to port with no changes. The other 20% is mainly OS specific code and all that is isolated in separate functions. Implement those functions and you have ported the code. I used to have a serial comm library that was portable across 4 compilers *and* 5 different types of serial ports. All that was needed to support new systems was to tie into a real-time clock tick, the serial port interrupt, and write the low level get/put characters. > >/Jon > >-- >Jon Anthony >Synquiry Technologies, Ltd., Belmont, MA 02178, 617.484.3383 >"Nightmares - Ha! The way my life's been going lately, > Who'd notice?" -- Londo Mollari Rud Merriam Houston