Seven Original Sins of K&R (Long)

Tom Horsley tom at ssd.csd.harris.com
Wed Sep 26 21:39:23 AEST 1990


What? only seven?

In this list, the only one that seems unforgivable to me is VII - short
names, but you left out the most absolutely awful and despicable sin of all:

                    VIII

The eight (and worst) original sin was allowing arrays to (sometimes) be
kind of automatically converted sort-of into pointers to the first element
of the array except when they aren't. Without a doubt this psuedo
equivalence between arrays and pointers that works most of the time except
when it doesn't has caused more confusion and twisted more brains of people
trying to learn C than any other feature.  If I want the address of an
array, why not stick an '&' operator in front of it like I have to do for
EVERY OTHER kind of variable in C?
--
======================================================================
domain: tahorsley at csd.harris.com       USMail: Tom Horsley
  uucp: ...!uunet!hcx1!tahorsley               511 Kingbird Circle
                                               Delray Beach, FL  33444
+==== Censorship is the only form of Obscenity ======================+
|     (Wait, I forgot government tobacco subsidies...)               |
+====================================================================+



More information about the Comp.lang.c mailing list