Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!pdn!tscs!tct!chip From: chip@tct.com (Chip Salzenberg) Newsgroups: comp.object Subject: Re: ada-c++ productivity Message-ID: <27F78021.1829@tct.com> Date: 1 Apr 91 18:46:57 GMT References: <27F0E12E.5B35@tct.uucp> Organization: Teltronics/TCT, Sarasota, FL Lines: 50 According to emery@aries.mitre.org (David Emery): >There is a wide body of experience (and at least one book) on porting >C code. Here are some observations: "At least one book"? Shirly, you jest. There are dozens. > First: How do you *know* if a compiler implements full ANSI C? There are validation suites for ANSI C. Of course, no validation suite -- not even the gummint's -- can guarantee that a compiler is bug-free. > The same thing is even more true with C++. The language >standardization effort is just now starting. Indeed. There is no C++ standard to validate -- yet. > Second: How do you know if the entire library is implemented correctly? In ANSI C, no distinction is made between "compiler" and "library", though such is frequently made in informal communication, based on common implementation techniques. >For instance, Microsoft C has signal handling routines in its MS-DOS >compiler, but it only handles Control-C. Microsoft may well be compliant with the standard anyway, even though it is (gasp!) unlike UNIX. Have you read the relevant portions of the ANSI standard? No, of course not, how silly of me to ask... >There's no way to get correct fork semantics on (single-tasking) MS-DOS. There is no ANSI C function named "fork()". > Finally: I've seen lots of C code that assumes int and *char >are interchangable. I trust you mean "char *". Yup, there are lots of incompetent code grinders in the world, people who use BFI (Brute Force and Ignorance) instead of skill and knowledge. There are also a lot of truly skilled and motivated people using C. And Fortran for that matter. So? >The problem with C is that it's awfully hard to find these places when >you're in the middle of a port. Can you say "lint"? I knew you could... -- Chip Salzenberg at Teltronics/TCT , "All this is conjecture of course, since I *only* post in the nude. Nothing comes between me and my t.b. Nothing." -- Bill Coderre