Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!xanth!kent From: kent@xanth.UUCP Newsgroups: comp.lang.c Subject: Re: learning C declaration syntax Message-ID: <2305@xanth.UUCP> Date: Sun, 30-Aug-87 04:46:51 EDT Article-I.D.: xanth.2305 Posted: Sun Aug 30 04:46:51 1987 Date-Received: Sun, 30-Aug-87 19:57:27 EDT References: <8877@brl-adm.ARPA> <8088@mimsy.UUCP> <1623@tekchips.TEK.COM> <956@bc-cis.UUCP> <223@xyzzy.UUCP> Reply-To: kent@xanth.UUCP (Kent Paul Dolan) Organization: Old Dominion University, Norfolk Va. Lines: 32 Summary: designed for superior programmers [in response to a long, thoughtful note about the difficulty of C declaration syntax, not included for brevity:] Wayne, If you judge by the amount of message traffic in comp.lang.c where one C user is trying to explain to other C users how to read a declaration involving pointers, arrays, and functions all mixed together, (it runs upwards of 50% in a long term average) then there surely is _something_ confusing (wrong?) with C's way of doing declarations. My own guess is that it is just much too general purpose. One of the early lessons embedded into the design of Ada, and in fact mandated in the procurement document, is that making something easy (in the sense of terse) to write is a long term loser in trying to get maintainable (read easy to understand) code. It would probably have made much more sense to mandate for C the multiple typedef sort of declarations that several correspondents have mentioned that they use to keep themselves sane while writing complex C declarations, even at the cost of many extra keystrokes. C was designed by a couple of the top programmers of this century, working in a shop full of their peers. Things that seemed easy and natural to them seem difficult and obscure to those of us more toward the average in ability. One usually designs tools for the average user, not the super user, but that wasn't the case for C. Many problems with C are easier to explain from that perspective. Also, as shown by the program names in Unix(tm), they surely hated to type! ;-) Kent, the man from xanth.