Improving C

rcd at opus.UUCP rcd at opus.UUCP
Sun Mar 11 03:10:21 AEST 1984


<>
 > 	Do you want a fast, powerful language like C, or do you want
 > a hand-holding, slow language like Pascal?  May I submit that Modula-2
 > or ADA might be just what you are looking for.  They have type checking and
 > array bounds policing galore.  Please do not subject the rest of us to
 > your unneccessary overhead.

1.  Languages are not fast or slow.  The code generated by a compiler for
the language is fast or slow.  It is possible to generate code from Pascal
which is roughly as efficient as that generated by a C compiler for most
equivalent constructs.  The existence of compilers which generate slow code
doesn't necessarily make the language "slow".

2.  C is not `powerful' compared to Pascal.  They are different, although
Pascal has a couple of features that C doesn't have which some people
associate with the "power" of the language.

3.  Type checking is neither unnecessary, nor does it involve any overhead
in the usual sense (execution time/space penalty).

4.  Any compiler suitable for production use allows you to turn off runtime
checks; you can get rid of them when you think you can take the chance.
The semantics of C are such that it's difficult to make array bounds
checking work even if you want it.  There's a big difference between having
a facility which you can use or not as you wish and not being able to have
it at all.

STILL, I'll side with the camp that says "Don't mess around with C."  It's
got some problems and some funny things in it, but it really ain't broke so
it don't need fixing!
-- 
{hao,ucbvax,allegra}!nbires!rcd



More information about the Comp.unix mailing list