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,1042f393323e22da X-Google-Attributes: gid103376,public From: NKSW39B@prodigy.com (Matthew Givens) Subject: Re: Any research putting c above ada? Date: 1997/04/16 Message-ID: <5j1a7g$cjm@newssvr01-int.news.prodigy.com>#1/1 X-Deja-AN: 235152949 Distribution: world References: <5ih6i9$oct$1@waldorf.csc.calpoly.edu> <2senchydgk.fsf@hpodid2.eurocontrol.fr> <5im3an$3dv@bcrkh13.bnr.ca> <33526cbf.41c6@cca.rockwell.com> <5j0e5i$qgi@bcrkh13.bnr.ca> Organization: Prodigy Services Company 1-800-PRODIGY Newsgroups: comp.lang.ada Date: 1997-04-16T00:00:00+00:00 List-Id: kaz@vision.crest.nt.com (Kaz Kylheku) wrote: > > >You can't freely assign between different types in C. For example, you can't >assign an pointer type to a structure type, or an integer type to a pointer >type, or a pointer to an incompatible pointer. Despite being an Ada programmer, >you have to recognize that C does have a strong type system and does demand >that type constraints be diagnosed. It's a myth that ``anything goes'' in C, >promoted by people who don't understand the language and who think that >diagnostics are mere annoyances. That's true, and only a fool would deny it. On the other hand, more conventional assignments are perfectly okay, such as: int x; char C; C= '5'; x= C - '0'; Easy, painless, and useful. The same idea works for converting between lower and upper case letters by adding or subtracting 32. These are mundane examples, but indicative. > >As an anticipated counter-argument to this, I could say that since you are >programming a computer, why not let the computer help you? Since the computer >can easily enforce the type distinctions inherent in the design, it ought >to do so. Yes, but it's my choice as to what level I want the type-checking performed at. I prefer a low level, giving me maximum flexibility. > >How often are there computer problems that don't make it into the news? >I have no idea. Since the media thrives on sensationalizing the macabre, you >only hear about the spectacular failures that cause a crash. Agreed. Whenever a PC fails and causes someone tobe injured or die, we hear about it forever, don't we? Or just let a virus run loose... - "Outside of a dog, a book is a Man's best friend. Inside of a dog it's very dark." << Iceman >>