Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: more about programming style Message-ID: <1041@umcp-cs.UUCP> Date: Tue, 30-Jul-85 00:03:36 EDT Article-I.D.: umcp-cs.1041 Posted: Tue Jul 30 00:03:36 1985 Date-Received: Wed, 31-Jul-85 05:33:29 EDT References: <272@brl-tgr.ARPA> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 19 (Entering personal religious belief flammable mode) Typedefs are very nice when applied sparingly. Before you use typedefs, figure out why some intrinsic type won't do---perhaps the type will have to change on some machines, but once changed will be fine (e.g., if you need 24 bit integers, perhaps int is good enough, but maybe you need longs; perhaps you should use a typedef). Typedefs can also help if a complex type is used very often. Other than that they just it harder to figure out what's really happening. I think I overdid it when I wrote "win.h" (part of Maryland Windows): it has a Win and a Buf (both aliases for structures, and maybe used often enough), but also a Pos, which should never have got out---it's not even used outside the structure definitions themselves.... -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland