[comp.lang.c] Excerpts from "The C Programming Language"

bagpiper@mcosm.uucp (05/25/90)

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!!!              +
-------------------------------------------------------------------------------

kassover@jupiter.crd.ge.com (David Kassover) (05/25/90)

>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."


Well and good.  But the *users* don't know what the programmer
was doing.

For that matter, the programmer doesn't know what the current
implementation or port is doing to the program (or the user)  8-)

I would think that if someone wanted to build a sharp tool, one
would also want to keep the edges away from the handles.  IMO,
Ada helps this more than C does.

--
David Kassover             "Proper technique helps protect you against
kassover@ra.crd.ge.com	    sharp weapons and dull judges."
kassover@crd.ge.com			F. Collins

jharkins@sagpd1.UUCP (Jim Harkins) (05/29/90)

In article <7937@crdgw1.crd.ge.com> kassover@jupiter.crd.ge.com (David Kassover) writes:
>I would think that if someone wanted to build a sharp tool, one
>would also want to keep the edges away from the handles.  IMO,
>Ada helps this more than C does.

Yeah, by enclosing the knife in a tough leather sheath and prohibiting the
removal of the knife from the sheath without ruining the knife.  Why do these
ADA/C/Pascal flame wars always crop up here?  Do we go into the ADA group and
flame their language?  I don't, I don't even subscribe to the damn thing.
Why don't they stay where they belong and leave us real programmers alone?


-- 
jim		jharkins@sagpd1

I *still* don't know who killed Laura Palmer!

ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (05/29/90)

In article <791@sagpd1.UUCP>, jharkins@sagpd1.UUCP (Jim Harkins) writes:
> Why do these
> ADA/C/Pascal flame wars always crop up here?  Do we go into the ADA group and
> flame their language?

Yes.

> I don't, I don't even subscribe to the damn thing.

I do subscribe.  There's probably more bashing of Ada by C bigots than
there is C bashing by Ada lovers, proportionally.

> Why don't they stay where they belong and leave us real programmers alone?

This is the net.  Mac/PC/ST/Amiga wars, UNIX/VMS/OS2/... wars, my language
is better than your language, it's not just argument, it's a way of life.
-- 
"A 7th class of programs, correct in every way, is believed to exist by a
few computer scientists.  However, no example could be found to include here."

diamond@tkou02.enet.dec.com (diamond@tkovoa) (05/29/90)

In article <791@sagpd1.UUCP> jharkins@sagpd1.UUCP (Jim Harkins) writes:

>Why do these ADA/C/Pascal flame wars always crop up here?

They don't always.  They pop up in other groups too.

>Do we go into the ADA group and flame their language?

If "we" means you and me, the answer is no.  If "we" means net users,
the answer is yes.

>I don't, I don't even subscribe to the damn thing.

No wonder you're asking stupid questions.  (Based on false premises,
as in "have you stopped beating your wife"...)

>Why don't they stay where they belong and leave us real programmers alone?

Some of us real programmers would be glad to see a new language which
contains only new design flaws, instead of copying old design flaws.
It means we need to know what the old design flaws are.
(The LENGTHS of these arguments, and the religious issues of whether
the flaws are desirable or not, are indeed pains.)

-- 
Norman Diamond, Nihon DEC     diamond@tkou02.enet.dec.com
Proposed group comp.networks.load-reduction:  send your "yes" vote to /dev/null.

kt4@prism.gatech.EDU (Ken Thompson) (05/30/90)

In article <3097@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
> There's probably more bashing of Ada by C bigots than
>there is C bashing by Ada lovers, proportionally.
>
Its only fair to point out that judging by the traffic in comp.lang.ada and
comp.lang.c there are a lot more C users/lovers on the net than ada
users/lovers.

				Ken

-- 
Ken Thompson  GTRI, Ga. Tech, Atlanta Ga. 30332 Internet:!kt4@prism.gatech.edu
uucp:...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!kt4
"Rowe's Rule: The odds are five to six that the light at the end of the
tunnel is the headlight of an oncoming train."       -- Paul Dickson