Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: UNIX/C Program Modularity Message-ID: <6098@utzoo.UUCP> Date: Wed, 30-Oct-85 15:32:48 EST Article-I.D.: utzoo.6098 Posted: Wed Oct 30 15:32:48 1985 Date-Received: Wed, 30-Oct-85 15:32:48 EST References: <2527@brl-tgr.ARPA> Organization: U of Toronto Zoology Lines: 20 > > Applications programs that have been designed to run under Unix > > tend to have a low percentage of re-usable code. > > Exactly! What this means is that you get to keep writing NEW stuff! The > common fragments have mostly been culled out and stuck into a library > for you. This is the mark of a successful design. Actually, "mostly" is overstating the situation. As various people, notably the Software Tools folks, have pointed out, it's so easy to do various things in Unix that nobody gets around to making library routines out of them -- it's too easy to reinvent the wheel each time. There ought to be rather more use of libraries than there is. Things like getopt(3) and the SysV string(3) routines are forward steps. (Note to listeners: both of these examples exist in public-domain versions that have been posted to the net repeatedly, so there is NO EXCUSE for not having them.) Some of the functions in Kernighan&Pike are also good candidates for putting in libraries. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry