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 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,ef0074ec236ba6e3 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b19fa62fdce575f9 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,ef0074ec236ba6e3 X-Google-Attributes: gid1108a1,public X-Google-Thread: 1014db,ef0074ec236ba6e3 X-Google-Attributes: gid1014db,public X-Google-Thread: 108717,ef0074ec236ba6e3 X-Google-Attributes: gid108717,public X-Google-ArrivalTime: 1994-12-13 16:23:46 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!spool.mu.edu!caen!usenet.coe.montana.edu!netnews.nwnet.net!news.u.washington.edu!mac.kat.gurgle!user From: gurgle@dnai.com (Pete Gontier) Newsgroups: comp.lang.ada,comp.lang.c,comp.programming,comp.lang.c++,comp.object Subject: Re: Why don't large companies use Ada? Date: Tue, 13 Dec 1994 09:52:54 -0700 Organization: cellular Message-ID: References: <1994Nov29.154220.27952@cognos.com> <3blinp$8dm@gnat.cs.nyu.edu> <3c873t$lut@calvin.st-and.ac.uk> <3c9jle$796@thyme.csv.warwick.ac.uk> NNTP-Posting-Host: eith.biostr.washington.edu Xref: bga.com comp.lang.ada:8581 comp.lang.c:34535 comp.programming:5817 comp.lang.c++:40821 comp.object:9801 Date: 1994-12-13T09:52:54-07:00 List-Id: In article <3c9jle$796@thyme.csv.warwick.ac.uk>, csusb@csv.warwick.ac.uk (Jules) wrote: > In article <3c873t$lut@calvin.st-and.ac.uk>, > ajry@st-andrews.ac.uk (Alistair James Robert Young) writes: > >> I am in the throes of learning C++ m'self, and have a problem using >> the OS-specific header files with C++. These header files use a type >> PSZ to pass strings to functions. This type is exactly the same as a >> char *, but the compiler refuses to acknowledge this, forcing me to >> use three or four typecasts in every OS call. I think it's likely that this is the headers' fault. Perhaps they are failing to use 'const' in the right places. Or you're on an Intel machine and all that silly 'near' and/or 'far' business hasn't been done perfectly (in which case brute-force type-casting is downright dangerous). The following code compiles without a warning under Metrowerks CodeWarrior C++ version CW4: typedef char *foo; typedef char *bar; static void fooFunc (foo) { } static void barFunc (bar) { } static void charFunc (char *) { } void main (void) { foo baz = 0; bar quux = 0; char *cp1 = baz; char *cp2 = quux; barFunc (baz); fooFunc (quux); charFunc (baz); charFunc (quux); } > This is one of the problems of adding strict typing onto the top of an > existing language, as was done for C++... What you need is a new language... Bzzzzt! Learn C++ before you bash it. Don't get me wrong; I wish there were a Macintosh Ada compiler worth using, because then I could get a real perspective on the language. In the meantime, I'd rather use C++ than anything else, and I will certainly avoid bashing Ada until I can do so from an informed perspective. -- Pete Gontier // MacZealotry, Ink. // gurgle@dnai.com Where do I want go today? Anywhere but Chicago, thanks.