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, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.lang.c:29078 comp.lang.ada:3842 Path: utzoo!attcan!uunet!tank!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!usc!trwind!mcosm!bagpiper From: bagpiper@mcosm.uucp Newsgroups: comp.lang.c,comp.lang.ada Subject: Re: Excerpts from "The C Programming Language" (Re: C bashing) Message-ID: <233@mcosm.uucp> Date: 24 May 90 20:58:15 GMT References: <2426@psuhcx.psu.edu> Distribution: comp Organization: Microcosm, Inc. List-Id: I basically agree with Mr. Hannum...I just want to correct his misconception that you can't do cast-like operations in Ada....you just can't do them very efficiently!! (no flames please, many Ada implementation don't handle generics very well...) In article <2426@psuhcx.psu.edu>, hannum@schubert.psu.edu (Charles Hannum) writes: > To settle some of the flame wars from Ada, Lisp, and Pascal lovers against the > C language, I quote some paragraphs from the introduction to "The C Programming > Language" by Brian W. Kernighan and Dennis M. Ritchie below: > [stuff deleted] > of incompatible data types. Nevertheless, C retains the basic philosophy that > programmers know what they are doing; it only requires that they state their > intentions explicitly." > > Pay careful attention to that last sentence. This is the basic philosophical > difference between C and [Ada,Pascal,...]. C allows you to do funny type cast- > ing, as long as you state it explicitly. [Ada,Pascal,...] does not. In the > hands of an idiot, this is dangerous. In the hands on an experienced and > knowledgable programmer, this is a powerful tool. You can do cast like operations in Ada. Check out the predefined generic UNCHECKED_CONVERSION. There are also a few other places where Ada seems to have lower level features then c. Some of the representation attributes are hard to copy in c. Of course the other day I was trying to write a minimal debugger in Ada and just about killed myself for some way to represent a generic pointer (void *). Oh well.... [more stuff deleted] > Virtually, > - Charles Martin Hannum II PennMUD Design Team - (Resident) Programmer > (That's Charles to you!) "Those who say a thing cannot be done should > Please send mail to: under no circumstances stand in the way of > hannum@haydn.psu.edu he who is doing it." - a misquote Later, Michael P.S. I am no receiving comp.lang.ada yet (I'm working on it), so if someone in comp.lang.ada has something to say, please mail it. ------------------------------------------------------------------------------- + Michael Hunter {backbone}!hacgate!trwind!mcosm!bagpiper + + BIX:bagpiper + + NOTHING like a spacecraft with a bad attitude!!! + -------------------------------------------------------------------------------