Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucla-cs.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!tektronix!hplabs!sdcrdcf!trwrb!trwrba!cepu!ucla-cs!alex From: alex@ucla-cs.UUCP Newsgroups: net.lang.c Subject: Re: more about programming style Message-ID: <6491@ucla-cs.ARPA> Date: Sun, 4-Aug-85 22:59:47 EDT Article-I.D.: ucla-cs.6491 Posted: Sun Aug 4 22:59:47 1985 Date-Received: Mon, 12-Aug-85 01:03:18 EDT References: <732@dataio.UUCP> <4067@alice.UUCP> Reply-To: alex@ucla-cs.UUCP (Alex Quilici) Organization: UCLA Computer Science Department Lines: 23 In article <4067@alice.UUCP> ark@alice.UUCP (Andrew Koenig) writes: >>I would appreciate comments, suggestions, etc. on additional ways to >>make type declarations more readable. > >The easiest way to make them more readable is to learn how to read them. WRONG! The easiest way to make programs more readable is to keep readability in mind when you write them. It has nothing to do with learning how to read very obscure type declarations or having memorized the C operator precedence table. So you can understand: int (*foo[10])(); That doesn't help someone who is reading your program who doesn't. But writing the declaration as done below does. typedef int (*PFI)(); /* pointer to function returning int */ PFI foo[10]; While knowing how to read complicated declarations may help you meet girls at cocktail parties, it doesn't help your program's reader! Alex